On Apr 28, 2014, at 9:41 AM, Konstantin Tokarev <annu...@yandex.ru> wrote:

> 
> 28.04.2014, 19:56, "Enrico Granata" <egran...@apple.com>:
>> You can't use expressions in summary strings.
>> We have thought about this several times and have a couple ideas on how it 
>> could be done but for now it's not there.
>> 
>> If you need to resort to an expression, you can use a python formatter 
>> instead and then you are free to call as many expressions as you like.
>> 
>> However, this will cause a slowdown - running expressions is not free - and 
>> if you ever need to make sure nothing is altering your program state, 
>> running expressions might not be a safe bet.
>> Is there really no other way to get to those UTF8 bytes?
> 
> QString stores UTF16 data inside.
> 

That is easy to deal with - refer to examples/summaries/unicode_strings.py in 
the LLDB source tree

All you want to do is take the utf16_summary function, and adjust it to reflect 
the innards of QString (what is the name of the child that contains the bytes, 
what is the name of the child that contains the length) - then you can tuck 
that function away in some file, and register it as a summary for QString - all 
without calling functions in the inferior process!

> -- 
> Regards,
> Konstantin

- Enrico
📩 egranata@.com ☎️ 27683



_______________________________________________
lldb-dev mailing list
lldb-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to