Module: wine Branch: master Commit: ce737601d54f42123c3cd56c2f923d7fe50756c5 URL: https://gitlab.winehq.org/wine/wine/-/commit/ce737601d54f42123c3cd56c2f923d7...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Mar 9 17:26:24 2023 +0100
wow64: Fixup Eip for breakpoint exceptions.
Matching the 32-bit setup_raise_exception().
---
dlls/wow64/syscall.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c index 17cfe337532..69f2f6c50a5 100644 --- a/dlls/wow64/syscall.c +++ b/dlls/wow64/syscall.c @@ -215,6 +215,9 @@ static void call_user_exception_dispatcher( EXCEPTION_RECORD32 *rec, void *ctx32 context = RtlLocateLegacyContext( context_ex, NULL ); *context = ctx; context->ContextFlags = flags; + /* adjust Eip for breakpoints in software emulation (hardware exceptions already adjust Rip) */ + if (rec->ExceptionCode == EXCEPTION_BREAKPOINT && (wow64info->CpuFlags & WOW64_CPUFLAGS_SOFTWARE)) + context->Eip--; stack->context_ptr = PtrToUlong( context );
if (src_ex)