[lldb-dev] Using data formatters to display QString

Poenitz Andre Andre.Poenitz at digia.com
Mon Apr 28 15:01:19 PDT 2014

Enrico Granata wrote:
> Eran Ifrah wrote:
> 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 is stored in UTF16 internally. It can be accessed directly
through structure member access and pointer arithmetic and converted
using Python. "Running expressions" is not needed.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140428/3ee284d3/attachment.html>

More information about the lldb-dev mailing list