Commit 4fabaa6a authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 75b3022a
...@@ -1018,6 +1018,9 @@ static void setup_exception( ucontext_t *sigcontext, EXCEPTION_RECORD *rec ) ...@@ -1018,6 +1018,9 @@ static void setup_exception( ucontext_t *sigcontext, EXCEPTION_RECORD *rec )
return; 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 = virtual_setup_exception( stack_ptr, (sizeof(*stack) + 15) & ~15, rec );
stack->rec = *rec; stack->rec = *rec;
stack->context = context; stack->context = context;
...@@ -1336,6 +1339,7 @@ static void trap_handler( int signal, siginfo_t *siginfo, void *sigcontext ) ...@@ -1336,6 +1339,7 @@ static void trap_handler( int signal, siginfo_t *siginfo, void *sigcontext )
NtRaiseException( &rec, &ctx, FALSE ); NtRaiseException( &rec, &ctx, FALSE );
return; return;
} }
PC_sig( context ) += 4; /* skip the brk instruction */
rec.ExceptionCode = EXCEPTION_BREAKPOINT; rec.ExceptionCode = EXCEPTION_BREAKPOINT;
rec.NumberParameters = 1; rec.NumberParameters = 1;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment