[lldb-dev] How to deal with STL type names in C++ code?

Eugene Birukov via lldb-dev lldb-dev at lists.llvm.org
Thu Aug 6 14:02:39 PDT 2015


Hi,
I am using LLDB C++ API to create custom debugger and trying to dump variables with their types. To do that I am using SBValue.GetTypeName() API. Some types are OK, but some others - especially ones related to STL - are quite unreadable:
(gdb) p value.GetTypeName()$1 = 0x7fffe419be40 "std::__1::unique_ptr<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char"...(gdb) p value.GetDisplayTypeName()$2 = 0x7fffe419be40 "std::__1::unique_ptr<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char"...(gdb) 
So, is there any way to convert them into some more human-friendly form?
Thanks,Eugene 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150806/ed66b0af/attachment.html>


More information about the lldb-dev mailing list