delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/16/04:37:18

Date: Thu, 16 Apr 1998 11:35:42 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Luke Bishop <lbishop AT calvin DOT stemnet DOT nf DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: Strange GDB Crash
In-Reply-To: <01bd682c$0e0b1920$6248a5c6@technoid>
Message-ID: <Pine.SUN.3.91.980416113435.12860A-100000@is>
MIME-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019