www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/24/12:41:06

Date: Thu, 24 Sep 1998 19:39:52 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Gisle Vanem <giva AT bgnett DOT no>
cc: djgpp AT delorie DOT com
Subject: Re: preserving exception context
In-Reply-To: <199809241326.PAA10226@login-2.eunet.no>
Message-ID: <Pine.SUN.3.91.980924193328.12533D-100000@is>
MIME-Version: 1.0

On Thu, 24 Sep 1998, Gisle Vanem wrote:

> The problem is that if shutdown() also crashes, I get a traceback for
> that crash and not the originating fault. How can I (besides writing
> shutdown() foulproof) get a traceback for both or a least only the first
> crash.

What exactly do you mean by ``the traceback of the first crash''?  If you
mean the call stack dump of EIPs, then the second one includes the first
one, since your SIGSEGV handler was CALLED by the original exception (via
__djgpp_exception_processor).  The only thing that's lost is the
registers' dump.  If you need that, you will probably need to hack the
signal-handling code (dpmiexcp.c in djlsr201.zip) to store away the
exception structure.  But do you really need the registers? 

> Note, this is all with djgpp 2.02 alpha, where `raise(SIGABRT)' seems to
> work as intended (I sometimes got stange results in 2.01).

raise(SIGABRT) in v2.01 just prints "Abort!" and exits.  So you don't get 
any traceback at all, if shutdown doesn't crash.

- Raw text -


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