I would like to access the frames stored in the core dump of a program that does not have debugging symbols (I want to do this in C). When I open the program and the core dump inside GDB, I get a stack trace, including function names. For example:
(gdb) bt #0 0x08048443 in layer3 () #1 0x08048489 in layer2 () #2 0x080484c9 in layer1 () #3 0x0804854e in main ()
The names of all functions are stored in the executable file in the .strtab section. How can I plot a stack trace with different frames? Running GDB in batch mode is not . And also just “copying the parts from gdb that are needed” is also a good idea, because the code is not written independently.
So, to clarify my question: where can I find the point inside the core dump, where can I start reading stack information? Is there any library to access this information? Can I use a structure? Or better yet, documentation, how is this data structured inside a core dump?
(I already saw the question " how to create a stack trace from a core dump file in C without calling an external tool like gdb ", but since there is no valid answer, I thought I would ask it again)
[Edit] I do this under Linux x86
Uhlo
source share