From 2a2a62fce7356b2b995211bf0e43ffb8c3b1a31a Mon Sep 17 00:00:00 2001 From: Peter Edwards Date: Mon, 10 Jun 2024 09:00:28 -0700 Subject: [PATCH] arm: if we are looking at the signal trampoline, it's scopeIP == rawIP On Aarch64, there's no FDE for the signal trampoline, so we detect it by finding the name of the symbol. In this case, we have a specific flag in the CodeLocation to indicate this is a signal trampoline, as we have no CIE to indicate it. If we have such a flag in the stack frame, don't bother looking for the FDE/CIE, and just return the raw IP address for scopeIP (there's no need to subtract 1 to get into the call instruction, as there was no call instruction, and subtracting one will bring us out of the function itself in this case) This is mostly cosmetic - we unwind properly through this frame, but we don't find the symbol for it correctly. --- dwarfproc.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dwarfproc.cc b/dwarfproc.cc index f49521b..497fb6d 100644 --- a/dwarfproc.cc +++ b/dwarfproc.cc @@ -55,6 +55,8 @@ StackFrame::scopeIP(Process &proc) const return { proc, raw }; if (mechanism == UnwindMechanism::MACHINEREGS) return { proc, raw }; + if (isSignalTrampoline) + return { proc, raw }; ProcessLocation location(proc, raw); const auto *lcie = location.cie();