How to load seperate debug file e.g. abc.debug file instead of binary to debug in GDB?

156 Views Asked by At

"gdb program core.11230"

is the actual format of loading core to gdb. But I don't have 'program' binary. instead I have separate debug file along with core. So I am loading .debug file instead of binary as

"gdb coredump.debug coredump_core.dump"

This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /root/coredump.debug...done.


warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffdf0f23000
Core was generated by `./coredump'.

Program terminated with signal 11, Segmentation fault.
#0  0x0000000000400848 in main ()

Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.212.0.1.el6.x86_64 libgcc-4.4.7-23.0.1.el6.x86_64
(gdb)
(gdb) list +
1       coredump.cpp: No such file or directory.
        in coredump.cpp
(gdb) bt

It won't show me the exact line number and source code file while debugging in GDB. It is not the case with normal debugging with binary and core.

also I don't have source file. I have access only to core dump and separate debug files.

What am I doing wrong. Please some experts suggest?

0

There are 0 best solutions below