From 42099a7b77e4001594a3b8749a294eb9807e7890 Mon Sep 17 00:00:00 2001 From: Andrew Haberlandt Date: Tue, 20 Aug 2024 16:16:16 -0400 Subject: [PATCH] arm64: fix LR for libunwind --- pyda_core/pyda_unwind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyda_core/pyda_unwind.c b/pyda_core/pyda_unwind.c index 8e9d7eb..cb070e7 100644 --- a/pyda_core/pyda_unwind.c +++ b/pyda_core/pyda_unwind.c @@ -31,7 +31,7 @@ int pyda_get_backtrace (pyda_thread *t, char *buf, int size) { uc2->uc_mcontext.regs[6] = t->cur_context.r6; uc2->uc_mcontext.regs[7] = t->cur_context.r7; uc2->uc_mcontext.sp = t->cur_context.sp; - uc2->uc_mcontext.lr = t->cur_context.sp; + uc2->uc_mcontext.regs[30] = t->cur_context.lr; #else #error "Unsupported architecture" #endif