Module: wine Branch: master Commit: 2736fabc585b89328ae64dafaafabd262d2f200b URL: https://source.winehq.org/git/wine.git/?a=commit;h=2736fabc585b89328ae64dafa...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Aug 20 11:33:32 2021 +0200
ntdll: Don't handle breakpoint interrupts in Wow64 mode.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/unix/signal_x86_64.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index 2d55bd006c7..f541306d950 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -2436,8 +2436,10 @@ static inline BOOL handle_interrupt( ucontext_t *sigcontext, EXCEPTION_RECORD *r rec->ExceptionCode = STATUS_ASSERTION_FAILURE; break; case 0x2d: - switch (context->Rax) + if (CS_sig(sigcontext) == cs64_sel) { + switch (context->Rax) + { case 1: /* BREAKPOINT_PRINT */ case 3: /* BREAKPOINT_LOAD_SYMBOLS */ case 4: /* BREAKPOINT_UNLOAD_SYMBOLS */ @@ -2445,6 +2447,7 @@ static inline BOOL handle_interrupt( ucontext_t *sigcontext, EXCEPTION_RECORD *r RIP_sig(sigcontext) += 3; leave_handler( sigcontext ); return TRUE; + } } context->Rip += 3; rec->ExceptionCode = EXCEPTION_BREAKPOINT;