Mail Archives: djgpp/2002/06/05/22:01:05
From: | "Alex Oleynikov" <alex AT compuweigh DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Exception handling
|
Lines: | 31
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 6.00.2600.0000
|
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000
|
Message-ID: | <ExyL8.5132$ks5.512077@news2.east.cox.net>
|
Date: | Thu, 06 Jun 2002 01:03:32 GMT
|
NNTP-Posting-Host: | 68.15.54.9
|
X-Complaints-To: | abuse AT cox DOT net
|
X-Trace: | news2.east.cox.net 1023325412 68.15.54.9 (Wed, 05 Jun 2002 21:03:32 EDT)
|
NNTP-Posting-Date: | Wed, 05 Jun 2002 21:03:32 EDT
|
Organization: | Cox Communications
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Hello everybody!
I need some help with exception handling in DJGPP.
1.First of all, I am using 'REDIR -e crash.dmp myprog.exe' to capture the
stderr output from my application. In 99% of crash situations the resulting
crash.dmp file is empty, although if I run the program directly I can see
the stack traceback output on the screen. Also, if I redirect it to a
printer it prints the whole thing fine. Why doesn't REDIR save this
information to my file?
2.I hooked my handlers to several signals (SIGINT, SIGABRT, SIGSEGV and
SIGFPE). The handler basically saves a timestamp and the signal description
to a file, displays a message on the screen and calls
__djgpp_traceback_exit( ) procedure. For some reason, when SIGABRT signal is
being processed, the computer locks up completely when calling
__djgpp_traceback_exit(). I also tried using exit() or simply return from
the signal handler (since the SIGABRT is raised from assert()) - the result
is always the same - the computer locks up. Why is that?
2.If I will not be able to solve the problem with REDIR, is there a way to
get an output similar to the one produced by __djgpp_traceback_exit(), but
without terminating the application? In other words, can I somehow save the
stack traceback to a log file from within my signal handler?
Thanks ahead of time.
Alex Oleynikov
- Raw text -