[Dwarf-discuss] Dwarf dump interpretation

Michael Eager eager@eagercon.com
Sun Apr 1 06:29:52 GMT 2007


drizzle drizzle wrote:
> Hi
>    I am trying to understand the debug dump from my compiler.
> Pointers on how to interpret this dump would be appreciated.
> 
> Here is a fragment of the dump I have.   Any pointers on how this
> information is laid out. I am especially wondering what the reference
> to the .debug_abbrev is abt and  the line  .byte   0x00, 0x09, 0x03
> 
>  .section .debug_info, "", at progbits
>         .byte   0x7a, 0x02, 0x00, 0x00, 0x02, 0x00
>         .4byte  .debug_abbrev
>         .4byte  0x6f660108, 0x00632e6f, 0x636f6c2f, 0x6f686c61
>         .4byte  0x732f656d, 0x73656d75, 0x6e672f68, 0x6e695f75
>         .4byte  0x656e696c, 0x7079482f, 0x73417265, 0x652f6369
>         .4byte  0x72657478, 0x2f6c616e, 0x63786c63, 0x6f632f63
>         .4byte  0x6c69706d, 0x732d7265, 0x6372756f, 0x61742f65
>         .4byte  0x685f6772, 0x72657079, 0x2f343678, 0x542f6763
>         .4byte  0x00545345, 0x68746170, 0x30206363, 0x0100312e
>         .4byte  0x6c660200, 0x0074616f, 0x7b030404, 0x01000000
>         .4byte  0x00000091, 0x05000904, 0x626f6c67, 0x00008400
>         .byte   0x00, 0x09, 0x03

That's less a dump than the raw data which makes up the .debug_info
section.  You can find the DWARF Standard at http://dwarfstd.org.
Chapter 7 discusses the data representation of DWARF.

You don't say what compiler you are using.  If you are using
GNU tools, readelf --debug-dump (and other options) will generate
a formatted dump of the DWARF data.  Another utility is dwarfdump,
part of the libdwarf distribution.

-- 
Michael Eager	 eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077




More information about the Dwarf-discuss mailing list