Qtcreator debugging helper for specialized string object breaks on expand



  • I wrote a qtcreator debugger helper for our home brewed string library.

    def qdump__mystring(d, value):
      length = int(value["slen"])
    
      d.check(0 <= length and length <= 100000000)
      p = value["sdata"]
      d.putCharArrayHelper(p, length, d.createType('wchar_t'), 'utf8')
      d.putType("mystring*")
    

    Works well,
    This works well

    Until I expand them
    expanded

    I tried several things but nothing worked.

    The "mystring" declaration in c-code looks something like this,

    struct mystring
    {
        uint slen;
        uchar *sdata;
        // ... 
    }
    

    As far as I know the strings are utf8. How do I solve this issue.
    I was looking at a way to iterate over the individual characters and knit together a string.

    Thanks for your attention and efforts. Many regards.


  • Qt Champions 2017

    Hi @QPrashanth,

    I think it's best to ask this questions on the Qt Creator mailing list. You have higher chances to get an answer there, as the debugging helpers are a very special topic.

    Regards


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.