linuxdebugginggccrhel5

gcc 4.8.2 no recognized debugging information


I have two workstations, one of them runs Debian Wheezy and has gcc 4.9.2

Second one runs RHEL 5.5, gcc version is 4.8.2

when I compile the same code with the same options:

$gcc -O3 -DNDEBUG -g -o test test.c

I get all the necessary debugging information on gcc 4.9 on Debian box, however on RHEL box objdump says:

$ objdump --debugging test

test:     file format elf64-x86-64
objdump: test: no recognized debugging information

What do I do wrong?


Solution

  • From looking around, this appears to be a known bug or limitation in objdump:

    Suggested workarounds are using objdump -W, readelf -w, or gcc -gstabs.