C++ dwarves

Have been working on supporting C++ concepts expressed in DWARF tags, so far we support definitions of classes, enums, etc inside classes, namespacing not yet supported, but as each class, being inside another class or not have a unique DWARF identifier, the so called cu (Compilation Unit) offset, not having namespaces is not much of a problem, only when printing a class we don’t see it properly nested, but this will be handled shortly.

Another thing to do is to add support to DW_TAG_inheritance, so that the dwarves gang don’t get confused with the “first” member having a non-zero offset, this also is something that sounds rather easy to implement.

All in all this experience has been so far very interesting, to finally match all the theory I have learned in another life, some 13 years ago, when I was a C++ programmer, matching the reality of a, by now, mainstream compiler, g++ 🙂

Anybody that by chance reads these ramblings and uses another compiler that generates DWARF info (Intel C, for instance comes to mind) and that could send me an object file + the preprocessed output for me to see if these tools works correctly with something non-gcc/g++ would be very welcome and I’d really appreciate a lot.

Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: