This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
How to catch GDB crash
- From: Dmitry Smirnov <divis1969 at mail dot ru>
- To: gdb at sourceware dot org
- Date: Mon, 23 Jun 2008 20:31:53 +0400
- Subject: How to catch GDB crash
- Reply-to: Dmitry Smirnov <divis1969 at mail dot ru>
Hi,
I've encountered the very annoying problem with GDB. While debugging, it crashes for some reason and I cannot catch this moment. I have a possibility to attach to the running process with another GDB, but it does not help. Perhaps, there is some way to catch some system exception or something similar?
I'm using a litle bit complex setup, so there is no much freedom (at least I cannot simplify the situation). First, I'm debugging from Eclipse (and it looks this crash happens only while running from Eclipse, I've tried from commad line - there is no crash). The debugger I'm using is cross-compiled arm-elf-gdb. It is compiled on windows (i686) platform:
GNU gdb (GDB) 6.8.50.20080620
...
This GDB was configured as "--host=i686-pc-cygwin --target=arm-elf".
I doubt this can be linked to GDB version. I recall I've seen this crash earlier with arm-elf-gdb 6.5 from GNUARM. I was just skipped this crash somehow but now I cannot continue my job.
This arm-elf-gdb is running against skyeye simulator as a remote target.
As you can see there are many possibilities for mailfunctioning software (Eclipse, GDB, skyeye). But the only way I can find the root cause is to debug the crash in arm-elf-gdb. While crashing it attempts to create the crashdump file, but it is incomplete and Cygwin gdb cannot recognize it. Typically it contains just three lines:
Stack trace:
Frame Function Args
0022E268 7C802532 (00000058
If attached, Cygwin GDB just reporting me:
Program exited with code 037777777777.
Is there any way to stop arm-elf-gdb on some critical error?
Dmitry