Red Hat Bugzilla – Bug 118383
objdump -g does not print debugging info
Last modified: 2007-11-30 17:07:00 EST
Description of problem:
objdump -g <objectfile> does not print debugging info.
Version-Release number of selected component (if applicable):
RHEL3 AS, Update 1.
Steps to Reproduce:
1. compile any C program with "-g" (gcc -g -o foo foo.c)
2. try dumping debugging info: objdump -g foo
objdump: foo: no recognized debugging information
objdump should print debugging (stabs) info.
i am especially interested in struct info (size, member offsets etc.)
looks that gcc3 does not have a .stabs ELF section. and that
makes objdump believe that there is no debugging information.
this happens with gcc 3.2 and binutils w/ RHEL3 Update 1.
gcc version: gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-24)
binutils : 18.104.22.168.4-26.3
objdump ver: GNU objdump 22.214.171.124.4 20030523
Please read the manual page of objdump:
"-g ... Only certain types of debugging information have been
implemented. Some other types are supported by `readelf -w'."
Particularly, DWARF2 which now GCC emits by default is supported
only by readelf -w[liaprmfFso].