Correctly convert into EXCEPTION_RECORD SIGTRAPs received from

DebugBreakProcess.
This commit is contained in:
Eric Pouech 2003-06-07 00:33:13 +00:00 committed by Alexandre Julliard
parent cc02ef89c4
commit 8638b26483
1 changed files with 6 additions and 0 deletions

View File

@ -842,6 +842,12 @@ static void do_trap( CONTEXT *context, int trap_code )
{
context->ContextFlags = CONTEXT_DEBUG_REGISTERS;
NtGetContextThread(GetCurrentThread(), context);
/* do we really have a bp from a debug register ?
* if not, then someone did a kill(SIGTRAP) on us, and we
* shall return a breakpoint, not a single step exception
*/
if (!(context->Dr6 & 0xf))
rec.ExceptionCode = EXCEPTION_BREAKPOINT;
}
break;
case T_BPTFLT: /* Breakpoint exception */