Mail Archives: djgpp/1998/12/17/11:50:25
On Wed, 16 Dec 1998 10:18:20 +0200, Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
wrote:
>
>On Wed, 9 Dec 1998 sjoerd DOT s DOT bakker AT tip DOT nl wrote:
>
>> The following test-code installs a protected mode INT 1 (single-step)
>> handler that runs well with CWSDPMI but crashes under Windows 95 with
>> a registerdump caused by SIGTRAP.
>
>INT 1 is not a hardware interrupt in the normal sense. Try installing a
>signal handler for SIGTRAP instead. You will probably need to make the
>handler do a longjmp (instead of returning to the caller), to prevent the
>program from crashing.
If I do a longjmp, then I will lose track of the executing program and
I want to trace each instruction. Longjmp restores the stack-segment
and -pointer, so there would be no way to get back to the instruction
following the one that caused SIGTRAP.
I had tried a normal return from the signal handler, but I got a
SIGTRAP registerdump with an error message about the handler not being
able to return... as to be expected since the cause of the exception
(TRAP-flag set) still exists after returning.
- Raw text -