Date: Thu, 24 Sep 1998 19:39:52 +0300 (IDT) From: Eli Zaretskii To: Gisle Vanem cc: djgpp AT delorie DOT com Subject: Re: preserving exception context In-Reply-To: <199809241326.PAA10226@login-2.eunet.no> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.