Clear the single-step flag in setup_exception instead of in the

SIGTRAP handler to avoid having the assigmnent optimized out.
This commit is contained in:
Alexandre Julliard 2005-10-04 15:56:34 +00:00
parent f5e49be317
commit 7955fb01d7
1 changed files with 1 additions and 1 deletions

View File

@ -813,6 +813,7 @@ static EXCEPTION_RECORD *setup_exception( SIGCONTEXT *sigcontext, raise_func fun
/* now modify the sigcontext to return to the raise function */
ESP_sig(sigcontext) = (DWORD)stack;
EIP_sig(sigcontext) = (DWORD)func;
EFL_sig(sigcontext) &= ~0x100; /* clear single-step flag */
CS_sig(sigcontext) = wine_get_cs();
DS_sig(sigcontext) = wine_get_ds();
ES_sig(sigcontext) = wine_get_es();
@ -1059,7 +1060,6 @@ static HANDLER_DEF(trap_handler)
{
case T_TRCTRAP: /* Single-step exception */
rec->ExceptionCode = EXCEPTION_SINGLE_STEP;
EFL_sig(HANDLER_CONTEXT) &= ~0x100; /* clear single-step flag */
break;
case T_BPTFLT: /* Breakpoint exception */
rec->ExceptionAddress = (char *)rec->ExceptionAddress - 1; /* back up over the int3 instruction */