extracting debug info from a binary

From: mat bike (mat_bike_at_yahoo.com)
Date: 10/30/03


Date: 30 Oct 2003 08:10:18 -0800

Hi ppl,

Could you please help me in extracting the debug info from a binary
for use with gdb? Or generate the debug info apart from the binary it
represents? I'm using GNU tools (ie, gcc). I have already tried a
few methods like:

gdb -batch -nx -mapped -readnow program <-- from gdb manual

and

objdump -j .stabs program program.syms

but they didn't work.

Any help would be appreciated.

Thanks a bunch!

mat



Relevant Pages

  • fixing gdb
    ... I reported recently a bug in gdb for amd64. ... local variables if you use the stabs debug info. ... Fix: avoid them. ...
    (comp.os.linux.development.system)
  • backtraces at runtime in Linux
    ... If I "make" the example and run it under gdb, ... from calling backtrace() or backtrace_symbols_fd. ... Detecting a signal handler frame takes ... This is because the debug info resides only in the file, ...
    (comp.os.linux.development.apps)
  • Re: debugging dlls with gdb
    ... So it uses PDB information to ... Is there a heap checker that works with MinGW/gcc/gdb? ... Is there a way to make gdb do the heap checking itself (I guess not, ... Can I somehow convert the gdb (or any other debug info gcc can create) ...
    (comp.programming)
  • Re: kswapd oops reproduced with 2.6.17-rc2 (was Oops with 2.6.15.3 on amd64)
    ... Unable to handle kernel paging request at ffff8000020369d8 RIP: ... If your kernel is compiled with the debug info, ... "gdb vmlinux" in the kernel sorces directory and then ...
    (Linux-Kernel)
  • Re: extracting debug info from a binary
    ... Could you please help me in extracting the debug info from a binary ... >: for use with gdb? ... Or generate the debug info apart from the binary it ... so that it will generate a core dump if something bad happens. ...
    (comp.os.linux.development.apps)