I have a core dump and a file where debug information is stored, can I use gdb without using an executable file to get a call stack with the name of functions and lines?
Advertisement
Answer
can I use gdb without using an executable file to get a call stack with the name of functions and lines?
At least on Linux/x86_64, the answer is no: the info saved after objcopy --only-keep-debug
is not sufficient; you also need the executable file.
This is happening (at least in part) because the debug_file
does not have the .eh_frame
section, which is necessary for unwinding on x86_64
.
If you are debugging the core dumps yourself, there is no reason to create debug_file
— just keep the original executable with full debug info for debugging (you can still ship a smaller stripped file to execution machines).