1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

ntdll: Fixup the pc address for breakpoint exceptions on ARM64.

This commit is contained in:
Alexandre Julliard 2023-09-15 15:57:09 +02:00
parent 75b3022aaa
commit 4fabaa6a28

View file

@ -1018,6 +1018,9 @@ static void setup_exception( ucontext_t *sigcontext, EXCEPTION_RECORD *rec )
return;
}
/* fix up instruction pointer in context for EXCEPTION_BREAKPOINT */
if (rec->ExceptionCode == EXCEPTION_BREAKPOINT) context.Pc -= 4;
stack = virtual_setup_exception( stack_ptr, (sizeof(*stack) + 15) & ~15, rec );
stack->rec = *rec;
stack->context = context;
@ -1336,6 +1339,7 @@ static void trap_handler( int signal, siginfo_t *siginfo, void *sigcontext )
NtRaiseException( &rec, &ctx, FALSE );
return;
}
PC_sig( context ) += 4; /* skip the brk instruction */
rec.ExceptionCode = EXCEPTION_BREAKPOINT;
rec.NumberParameters = 1;
break;