https://git.reactos.org/?p=reactos.git;a=commitdiff;h=158235bdd53577013cff990f554763ddda6ec6a4
commit 158235bdd53577013cff990f554763ddda6ec6a4 Author: Jérôme Gardou <jerome.gar...@reactos.org> AuthorDate: Mon Feb 1 16:36:53 2021 +0100 Commit: Jérôme Gardou <jerome.gar...@reactos.org> CommitDate: Mon Feb 1 16:39:39 2021 +0100 [NTOS:KE] Fix EIP only when the breakpoint is a break Fixes ntdll:exception winetest crash ROSTESTS-80 --- ntoskrnl/ke/i386/traphdlr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/ke/i386/traphdlr.c b/ntoskrnl/ke/i386/traphdlr.c index cf4dbdd92ee..1ae5bf02240 100644 --- a/ntoskrnl/ke/i386/traphdlr.c +++ b/ntoskrnl/ke/i386/traphdlr.c @@ -227,10 +227,10 @@ KiDebugHandler(IN PKTRAP_FRAME TrapFrame, /* Enable interrupts if the trap came from user-mode */ if (KiUserTrap(TrapFrame)) _enable(); - /* Dispatch the exception */ + /* Dispatch the exception. Fix EIP in case its a break breakpoint (sic) */ KiDispatchExceptionFromTrapFrame(STATUS_BREAKPOINT, 0, - TrapFrame->Eip - 1, + TrapFrame->Eip - (Parameter1 == BREAKPOINT_BREAK), 3, Parameter1, Parameter2,