Reputation: 11
I found a helpful topic for finding the lines of code which caused crash from coredump files on Window (http://www.codeproject.com/Articles/3472/Finding-crash-information-using-the-MAP-file). But I could not find similar topic for Linux. Sometimes I have coredump on testing system but I could not analyze them because of missing debug information. I could not replicate this crash so I could not debug them. Gdb stacktrace showed the stack like this:
#0 0x00a2b430 in __kernel_vsyscall ()
#1 0x01522b11 in raise () from /lib/libc.so.6
#2 0x015243ea in abort () from /lib/libc.so.6
#3 0x08126e9f in ?? ()
#4 0x081276a8 in ?? ()
#5 0x0808b6fb in main ()
So I would like to have similar topic for finding crash info from coredump on Linux as the topic above for Window. Could you help to sugess any solutions or related topics?
Upvotes: 0
Views: 72
Reputation: 695
Usually it is possible to recompile the program using exactly the same set of C compiler flags as the 'old' one, just adding -g to add debug information and then load this executable along the generated core dump into the debugger.
However, it is important to not change anything in the source code or change any of the compiler flags, since that would result in different code to be generated which would not match the core dump. The only flag that may be changed is -g which adds debug information.
Upvotes: 1