How do I have my program's core dump saved to a file upon a crash?
I'm using Bash. I used ulimit -c unlimited
but the program still doesn't generate a core开发者_如何学JAVA file. It may be due to the GUI debugger kicking in. I get the option to save the crash info to a file, but I really want a core file.
Edit: I just wrote a small non-gui program meant to crash, and it produced a core dump.
The simplest way is to run your app from the command line within gdb:
gdb --args /path/to/program with args
I assume the program that's causing you problems is Bug Buddy? You can always remove it or tweak your program to reset the default SIGSEGV handle to SIG_DFL after the GTK start-up to ensure the OS catches the signal and not any magic handling by the GUI libraries.
精彩评论