diff options
author | Ryan Prichard <rprichard@google.com> | 2020-09-30 18:31:05 -0700 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2020-10-02 16:34:14 -0700 |
commit | b57cc6edc1ab3cc6b5cc9da12eaa1dd7916926cc (patch) | |
tree | 289cc5807ca0461e542221e62ab4ec8934e6edf5 /libunwindstack/ElfInterfaceArm.h | |
parent | 6efcefbd5353c82d7198fa3bad3e391b6e88b87c (diff) | |
download | unwinding-b57cc6edc1ab3cc6b5cc9da12eaa1dd7916926cc.tar.gz |
libunwindstack: Support signal frame CIEs.
Mark a CIE with a S in its augmentation string as signal frame.
This allows the code to properly handle signal frame data if none
of the signal frame pattern matchers work.
For a signal frame, DwarfSectionImpl<AddressType>::Eval needs to
continue the unwinding even if PC is zero. A zero PC means that the
program has crashed, and we should try to recover the real PC using the
return address on the stack or LR. This behavior is tested by
UnwindOffline.signal_{x86,x86_64}, which modify the libc.so files
so that the signal frame pattern matcher fails and the CIE/FDE
data is used instead.
Test: libunwindstack_test
Change-Id: I4655b070028fd984345311a5e743796f8c30ed36
Diffstat (limited to 'libunwindstack/ElfInterfaceArm.h')
-rw-r--r-- | libunwindstack/ElfInterfaceArm.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libunwindstack/ElfInterfaceArm.h b/libunwindstack/ElfInterfaceArm.h index 1d71cac..fd824f8 100644 --- a/libunwindstack/ElfInterfaceArm.h +++ b/libunwindstack/ElfInterfaceArm.h @@ -72,7 +72,8 @@ class ElfInterfaceArm : public ElfInterface32 { void HandleUnknownType(uint32_t type, uint64_t ph_offset, uint64_t ph_filesz) override; - bool Step(uint64_t pc, Regs* regs, Memory* process_memory, bool* finished) override; + bool Step(uint64_t pc, Regs* regs, Memory* process_memory, bool* finished, + bool* is_signal_frame) override; bool StepExidx(uint64_t pc, Regs* regs, Memory* process_memory, bool* finished); |