[lldb-dev] wstring data formatter
Nino Kettlitz
nino.kettlitz at googlemail.com
Wed Aug 8 04:41:50 PDT 2012
Hi Enrico,
I tested the script and there are two points:
1. "_string_summary_size" is undefined
2. I do not know if "return s.encode('utf-8')" is tcorrect. What
encoding is the lldb stdout?
I registered the wstring_SummaryProvider for std::string also and
get wrong results.
std::string aString = "HÄLLÖ WÖRLD!!!";
std::wstring aString32 = L"HÄLLÖ WÖRLD!!!";
unsigned short pRawString[] = {'H', 0xc4 , 'L', 'L', 0xD6, 'W',
0xD6, 'R', 'L', 'D', '!', '!', '!', 0 };
std::basic_string<unsigned short> aString16 = pRawString;
(lldb) frame variable aString
(std::string) aString = "HÃ?LLÃ? WÃ?RLD!!!"
(lldb) frame variable aString16
(std::basic_string<unsigned short, std::char_traits<unsigned
short>, std::allocator<unsigned short> >) aString16 = "HÄLLÖWÖRLD!!!"
(lldb) frame variable aString32
(std::wstring) aString32 = "HÄLLÖ WÖRLD!!!"
Maybe thats an stl or compiler issue. When registering the
wstring_SummaryProvider for wstring and 16bit strings only everything is
fine.
Cheers,
Nino
Am 07.08.12 23:04, schrieb Enrico Granata:
> Hi Nino,
> just a quick note to keep you in the loop.
> After a few minor changes, this is the version of the std::wstring
> data formatter that we will be testing with for inclusion in the LLDB ToT.
> Let me know if you have any suggestions for improvements/changes :-)
>
> /Enrico Granata/
> ? egranata@?.com
> ? (408) 972-7683
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20120808/c03f46dd/attachment.html>
More information about the lldb-dev
mailing list