In most cases, unwinding will use the frame pointer anyway, so it doesn't make much of a difference, but for cases where it won't, capture the actual stack pointer.
(In most cases on arm64, calling the RtlCaptureContext won't cause anything extra to be pushed on the stack at that point anyway).
Signed-off-by: Martin Storsjo martin@martin.st --- Also fix the vertical alignment for the row above. --- dlls/ntdll/signal_arm64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index b364f08e9aa..4c9017b9e21 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -265,8 +265,8 @@ __ASM_STDCALL_FUNC( RtlCaptureContext, 8, "stp x23, x24, [x0, #0xc0]\n\t" /* context->X23,X24 */ "stp x25, x26, [x0, #0xd0]\n\t" /* context->X25,X26 */ "stp x27, x28, [x0, #0xe0]\n\t" /* context->X27,X28 */ - "stp x29, x30, [x0, #0xf0]\n\t" /* context->Fp,Lr */ - "add x1, x29, #0x10\n\t" + "stp x29, x30, [x0, #0xf0]\n\t" /* context->Fp,Lr */ + "mov x1, sp\n\t" "stp x1, x30, [x0, #0x100]\n\t" /* context->Sp,Pc */ "mov w1, #0x400000\n\t" /* CONTEXT_ARM64 */ "add w1, w1, #0x3\n\t" /* CONTEXT_FULL */