Skip to content

Commit

Permalink
arm: if we are looking at the signal trampoline, it's scopeIP == rawIP
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
peadar committed Jun 10, 2024
1 parent c82cacb commit 2a2a62f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dwarfproc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 2a2a62f

Please sign in to comment.