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?

Sent from the iPhone of
Enrico Granata <egranata@🍎.com>

> On Apr 28, 2014, at 7:33 AM, Eran Ifrah <eran.if...@gmail.com> wrote:
> 
> Hi,
> 
> I am trying to view the content of a QString, in gdb I could simply type from 
> the command line:
> 
> (gdb)print mystr.toUtf8().constData()
> 
> and I would get the info, can I do something similar with lldb's data 
> formatters (hint: I am getting parse error)? 
> 
> for example:
> type summary add QString --summary-string "${var.toUtf8().constData()}"
> 
> ​So my question is: can I use functions when defining 'type summary' or am I 
> limited to variables members only?
> 
> Thanks,​
> 
> -- 
> Eran Ifrah
> Author of codelite, a cross platform open source C/C++ IDE: 
> http://www.codelite.org
> wxCrafter, a wxWidgets RAD: http://wxcrafter.codelite.org
> _______________________________________________
> lldb-dev mailing list
> lldb-dev@cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
_______________________________________________
lldb-dev mailing list
lldb-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to