Mail Archives: djgpp-workers/1998/10/08/07:48:20
On Thu, 8 Oct 1998, Ilya Ryzhenkov wrote:
> Is there any _simple_ (i.e without rewriting libgcc parts)
> way to redefine standard behavior on unhandled exception ?
> It now just calls abort, which raises SIGABRT in turn and thus
> filling screen with uninformative text, far from real reason
> of halt.
My knowledge of C++ is abysmal, so the following might be downright
stupid.
First, what's wrong with installing a handler for SIGABRT and doing
whatever you want in there? SIGABRT is just a signal, so it can be
caught.
And second, what's wrong with the bahavior of `abort' in v2.02? It
prints the standard DJGPP traceback, which is a functional equivalent
of a core dump (or at least as close as you can get without supporting
core dumps ;-). In other words, it allows you to know where exactly
was `abort' called. It even prints the location where SIGABRT was
raised for your convenience. On Unix, `abort' actually dumps core.
Isn't that what unhandled exceptions should do?
- Raw text -