Mail Archives: djgpp/1998/06/11/13:35:42
On Tue, 9 Jun 1998 lubaldo AT adinet DOT com DOT uy wrote:
> I am adding some debuging capabilities to my PPCol library but I don't
> know how to force the output of the traceback, so the user can trace all the
> calls to functions and look where happened the problem.
From the code you posted I understand that you want to generate the
traceback and abort the program. If that's true, use the following
little wonder:
signal (SIGINT, SIG_DFL);
__asm__ __volatile__ ("movb $0x1b,%al;call ___djgpp_hw_exception");
The only thing that's not quite nice about this is that it says
"Exiting due to signal SIGSEGV", which is a lie, but other than that
it works just fine.
> raise(SIGABRT); //Tried with SIGSEGV also but got the same results.
SIGABRT is not documented to generate a traceback, so it doesn't. In
DJGPP v2.02, it *will* generate a traceback, so the above will work
then. In the meantime, use the inline assembly code.
- Raw text -