[Dwarf-discuss] reading DWARF

Jim Blandy jimb
Tue Feb 6 14:57:37 GMT 2007


On 2/6/07, gireesh subramaniam <gireeshin at gmail.com> wrote:
>       i wanted to use the object code so as to create a source language
> independent code browser.Can u help me with some useful links regarding
> dwarf dump information on inheritance in source or if possible even some
> programming examples:).The DWARF 3.0 pdf is not very helpful and is not very
> specific about the tags and attributes for the inheritance in source
> code.also i have been trying to write C/C++ code to read and process the
> dwarf directly from the program file.it would be really helpful if someone
> can come up with either a sort of algorithm or even some short programming
> examples for it.

Hi, Gireesh.  If you're using a Linux system, or using Cygwin on
windows, you will probably have  a program called 'readelf'.  If you
have an object file or executable with DWARF information in it,
'readelf -wi' will display the DWARF information in a human-readable
form.  You should try compiling various programs, and then looking at
the DWARF information they produce.

I don't think we have information in a more pre-digested form than the
DWARF spec itself.  It's big, but it's not impossible to read.





More information about the Dwarf-discuss mailing list