Module: wine Branch: master Commit: 8c41a215b99f8fefdf3aeba2e2838bbaa5082179 URL: https://gitlab.winehq.org/wine/wine/-/commit/8c41a215b99f8fefdf3aeba2e2838bb...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Dec 4 21:54:55 2023 +0100
ntdll: Skip NtRaiseException() call on ARM when debugger is not present.
---
dlls/ntdll/signal_arm.c | 7 ++++++- dlls/ntdll/tests/exception.c | 1 - 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c index e539289ec2f..ae355aa5a8c 100644 --- a/dlls/ntdll/signal_arm.c +++ b/dlls/ntdll/signal_arm.c @@ -1561,7 +1561,12 @@ __ASM_GLOBAL_FUNC( RtlRaiseException, "add r1, sp, #0x1a8\n\t" "str r1, [sp, #0x38]\n\t" /* context->Sp */ "mov r1, sp\n\t" - "mov r2, #1\n\t" + "mrc p15, 0, r3, c13, c0, 2\n\t" /* NtCurrentTeb() */ + "ldr r3, [r3, #0x30]\n\t" /* peb */ + "ldrb r2, [r3, #2]\n\t" /* peb->BeingDebugged */ + "cbnz r2, 1f\n\t" + "bl " __ASM_NAME("dispatch_exception") "\n" + "1:\tmov r2, #1\n\t" "bl " __ASM_NAME("NtRaiseException") "\n\t" "bl " __ASM_NAME("RtlRaiseStatus") )
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index 7edc829d680..bac571b2733 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -7425,7 +7425,6 @@ static void test_KiUserExceptionDispatcher(void) pRtlRaiseException(&record);
ok(got_exception, "Handler was not called.\n"); - todo_wine ok(!hook_called, "Hook was called.\n");
memcpy( code_ptr, patched_code, sizeof(patched_code) );