[NTOS:KE] Fix EIP only when the breakpoint is a break

Fixes ntdll:exception winetest crash
ROSTESTS-80
This commit is contained in:
Jérôme Gardou 2021-02-01 16:36:53 +01:00
parent 2a321f6e3f
commit 158235bdd5

View file

@ -227,10 +227,10 @@ KiDebugHandler(IN PKTRAP_FRAME TrapFrame,
/* Enable interrupts if the trap came from user-mode */ /* Enable interrupts if the trap came from user-mode */
if (KiUserTrap(TrapFrame)) _enable(); if (KiUserTrap(TrapFrame)) _enable();
/* Dispatch the exception */ /* Dispatch the exception. Fix EIP in case its a break breakpoint (sic) */
KiDispatchExceptionFromTrapFrame(STATUS_BREAKPOINT, KiDispatchExceptionFromTrapFrame(STATUS_BREAKPOINT,
0, 0,
TrapFrame->Eip - 1, TrapFrame->Eip - (Parameter1 == BREAKPOINT_BREAK),
3, 3,
Parameter1, Parameter1,
Parameter2, Parameter2,