Commit cffd06ea authored by Martin Storsjo's avatar Martin Storsjo Committed by Alexandre Julliard

ntdll: Trust libunwind's returned pc value on arm64.

Use this instead of manually copying LR to PC. With GNU libunwind, both registers are equal after unw_step. With the LLVM libunwind (which Apple uses), the return address isn't reflected at all in LR, only in UNW_REG_IP. Signed-off-by: 's avatarMartin Storsjo <martin@martin.st> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 849d08b0
......@@ -230,7 +230,7 @@ NTSTATUS CDECL unwind_builtin_dll( ULONG type, DISPATCHER_CONTEXT *dispatch, CON
unw_get_reg( &cursor, UNW_AARCH64_X29, (unw_word_t *)&context->u.s.Fp );
unw_get_reg( &cursor, UNW_AARCH64_X30, (unw_word_t *)&context->u.s.Lr );
unw_get_reg( &cursor, UNW_AARCH64_SP, (unw_word_t *)&context->Sp );
context->Pc = context->u.s.Lr;
unw_get_reg( &cursor, UNW_REG_IP, (unw_word_t *)&context->Pc );
context->ContextFlags |= CONTEXT_UNWOUND_TO_CALL;
TRACE( "next function pc=%016lx%s\n", context->Pc, rc ? "" : " (last frame)" );
......
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