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

2015-08-06 Thread Enrico Granata via lldb-dev
> On Aug 6, 2015, at 4:17 PM, Siva Chandra wrote: > > > > On Thu, Aug 6, 2015 at 3:58 PM, Enrico Granata > wrote: > >> On Aug 6, 2015, at 3:50 PM, Siva Chandra > > wrote: >> >> >> >> On Thu, Aug 6, 2015 at 3:38 PM, Enrico Granata >

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

2015-08-06 Thread Siva Chandra via lldb-dev
On Thu, Aug 6, 2015 at 3:58 PM, Enrico Granata wrote: > > On Aug 6, 2015, at 3:50 PM, Siva Chandra wrote: > > > > On Thu, Aug 6, 2015 at 3:38 PM, Enrico Granata wrote: > >> >> On Aug 6, 2015, at 3:33 PM, Siva Chandra wrote: >> >> >> >> On Thu, Aug 6, 2015 at 2:43 PM, Enrico Granata >> wrote:

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

2015-08-06 Thread Enrico Granata via lldb-dev
> On Aug 6, 2015, at 3:50 PM, Siva Chandra wrote: > > > > On Thu, Aug 6, 2015 at 3:38 PM, Enrico Granata > wrote: > >> On Aug 6, 2015, at 3:33 PM, Siva Chandra > > wrote: >> >> >> >> On Thu, Aug 6, 2015 at 2:43 PM, Enrico Granata >

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

2015-08-06 Thread Siva Chandra via lldb-dev
On Thu, Aug 6, 2015 at 3:38 PM, Enrico Granata wrote: > > On Aug 6, 2015, at 3:33 PM, Siva Chandra wrote: > > > > On Thu, Aug 6, 2015 at 2:43 PM, Enrico Granata wrote: > >> To be honest, my favorite approach would be to modify clang’s TypePrinter >> to do this, and then hooking up GetDisplayTyp

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

2015-08-06 Thread Enrico Granata via lldb-dev
> On Aug 6, 2015, at 3:33 PM, Siva Chandra wrote: > > > > On Thu, Aug 6, 2015 at 2:43 PM, Enrico Granata > wrote: > To be honest, my favorite approach would be to modify clang’s TypePrinter to > do this, and then hooking up GetDisplayTypeName() to use whatever flag

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

2015-08-06 Thread Siva Chandra via lldb-dev
On Thu, Aug 6, 2015 at 2:43 PM, Enrico Granata wrote: > To be honest, my favorite approach would be to modify clang’s TypePrinter > to do this, and then hooking up GetDisplayTypeName() to use whatever flags > would be necessary to invoke that bit of magic > Do you mean that clang's "pretty print

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

2015-08-06 Thread Siva Chandra via lldb-dev
FWIW, GDB has a similar concept called type-printers: https://sourceware.org/gdb/current/onlinedocs/gdb/Type-Printing-API.html On Thu, Aug 6, 2015 at 2:24 PM, Siva Chandra wrote: > Hi Enrico, > > I was thinking about the same issue today. Could we add a concept > called "TypeNameModifier" and pro

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

2015-08-06 Thread Siva Chandra via lldb-dev
Hi Enrico, I was thinking about the same issue today. Could we add a concept called "TypeNameModifier" and provide ability to define modifiers in scripts and command line? With this, a name like std::__1::basic_string<...> can be modified into a more friendly name like std::string? We could ofcour

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

2015-08-06 Thread Enrico Granata via lldb-dev
Hi Eugene, > On Aug 6, 2015, at 2:02 PM, Eugene Birukov via lldb-dev > wrote: > > 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

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

2015-08-06 Thread Eugene Birukov via lldb-dev
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::_