[lldb-dev] patch to access and retain the original name/type of an SBType

Carlo Kok ck at remobjects.com
Mon Oct 29 14:02:14 PDT 2012

Op 29-10-2012 21:55, Greg Clayton schreef:
> On Oct 29, 2012, at 1:12 PM, Carlo Kok <ck at remobjects.com> wrote:
>> Op 29-10-2012 20:54, Greg Clayton schreef:
>>> I would rather this not make it into the API if we can avoid it.
>>> Why do you need this? Can you give some justification?
> > my language has it's own type system. There are lots of types in it,
and none of them match the c/c++ names. However when calling GetName()
all that info is lost and i get back something like "unsigned short" or
"char*". On the calling side I have no way to turn that back into their
real types, I need this info to know if something is a (string)
character or if it's a 16bits integer, or for pointer types, if they
should be treated specials (some pointer to type-types are arrays while
others are not). C has no such distinction.
> Can you fix this by having your language emit better DWARF? Like use
typedefs and other common source idioms? Do you have your own debug info
parser, or are you using DWARF?

I am emitting proper DWARF. It's just that LLDB ignores the "name" of 
the dwarf records and several other things and makes presumptions on the 
debugged language being C/C++/ObjC, ignoring what the debug info says a 
type is really called and using it's own type names based on the bitsize 
and dwarf flags.

More information about the lldb-dev mailing list