Date: Thu, 16 Apr 1998 11:35:42 +0300 (IDT) From: Eli Zaretskii To: Luke Bishop cc: djgpp AT delorie DOT com Subject: Re: Strange GDB Crash In-Reply-To: <01bd682c$0e0b1920$6248a5c6@technoid> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On 16 Apr 1998, Luke Bishop wrote: > Is there some reason why Allegro will not work with GDB? I have had my > system lock up repeatedly and reboot several times while debugging a > program I wrote. There seems to be no particular reason why it crashed > when it did, or why it did. I run it under Win95, the first time I have > used GDB outside of native DOS. Any Ideas? Does the following excerpt from section 12.9 of the FAQ help you understand the reason? **Q*: I cannot debug any program which catches signals!!??* **Q*: I compiled my program with `-pg' switch, and now I cannot debug it...* **Q*: When my program hits a breakpoint in GDB, the debugger reports SIGSEGV, but only under Windows...* *A* : There are currently a few limitations in debugging programs which use interrupts or exceptions. Programs compiled for profiling may crash under a debugger with SIGSEGV or a GPF, with no addresses that `symify' can identify; programs using `alarm' or `setitimer' can't be debugged, either. You can't hook the keyboard interrupt in a debugged program, and you can't debug a program which uses floating point on a machine without FP hardware (unless you use `WMEMU' as your emulator, but even WMEMU doesn't solve all the problems). The reason for all these problems is that any exceptions or signals that happen when your program runs under a debugger will be caught by the debugger instead, and they won't get passed to the debuggee. To debug programs which hook hardware interrupts, you will have to chain the old real-mode interrupt handler to your new handler, which requires to write special debug version of the program.