Mail Archives: djgpp/1997/06/01/09:06:46
On Thu, 29 May 1997, Andrei 'old-boy' Ellman wrote:
> Whenever a DJGPP program crashes, it prints out the contents of the
> registers. Is it somehow possible to get it to dump the contents of the
> FPU registers as well? Also, it would be nice if whenever my program
> crashed with a SIGFPE, it would be more specific as to what caused the
> FPE (Register-stack full/empty, underlow, overflow, divide by zero,
> etc.).
Install a handler for the signal SIGFPE and inside that handler
examine the FPU status word (see `_status87' library function). If
you need the FPU stack, just throw in a bit of inline assembly.
- Raw text -