I have a program running in Linux and It’s been mysteriously crashing. I already know one way to know where it crashes at is to use GDB. But I don’t want to attach to it every time I restart it (do this a lot since I’m testing it). Is there an alternative way to do this?
Share
First use
ulimit -c unlimitedto allow crashed programs to write core dumps.After the program crashes, you’ll find a core dump file, called
core, or perhapscore.<pid>if your program is multithreaded.You can load this into GDB to examine the state at the point of the crash with
gdb program core.