05-22-07 06:18 AM
Doug McIntyre <merlyn@geeks.org> writes:
> Its not standard, or generalized. Each compiler/enviornment is different.
Untrue. There are differences between compilers, but most of them
are slight variations of DWARF2 or DWARF3 debug format.
> Ie. Sun C Workshop gives out a bunch of sections..
> .debug_info
> .debug_line
> .debug_abbrev
> .debug_pubnames
> .debug_typenames
> .debug_varnames
See description of DWARF for what's inside.
> GCC doesn't use .debug either, it uses .stab/.stabstr instead on some
> platforms.
Gcc uses .stab* when it generates STABS debug info ('-gstabs',
'-gstabs+', etc.). Newer gcc releases default to DWARF3 on ELF
platforms:
$ /usr/local/gcc-4.2.0/bin/gcc -g junk.c -c
$ readelf -S junk.o | grep ' \.debug'
[ 2] .debug_abbrev PROGBITS 00000000 000123 000047 00 0
0 1
[ 3] .debug_info PROGBITS 00000000 00016a 00009d 00 0
0 1
[ 4] .debug_line PROGBITS 00000000 000207 000076 00 0
0 1
[ 6] .debug_frame PROGBITS 00000000 0002c8 000064 00 0
0 4
[ 7] .debug_loc PROGBITS 00000000 00032c 00005a 00 0
0 1
[ 8] .debug_pubnames PROGBITS 00000000 000386 00002b 00 0
0 1
[ 9] .debug_aranges PROGBITS 00000000 0003b1 000020 00 0
0 1
Use 'readelf -w' to decode DWARF .debug* info.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
[ Post a follow-up to this message ]
|