class CfiModule
Defined at line 41 of file ../../src/lib/unwinder/cfi_module.h
Represents the Call Frame Information (CFI) from the .eh_frame and/or the .debug_frame section
of one ELF module.
This class doesn't cache the memory so if repeated lookups are required, it's recommended to use
a cached Memory implementation.
Public Methods
void CfiModule (Memory * elf, uint64_t elf_ptr, const Module & module)
Caller must ensure elf to outlive us.
Defined at line 44 of file ../../src/lib/unwinder/cfi_module.h
bool IsValidPC (uint64_t pc)
Check whether a given PC is in the valid range.
Defined at line 60 of file ../../src/lib/unwinder/cfi_module.h
Memory * memory ()
Memory accessor.
Defined at line 63 of file ../../src/lib/unwinder/cfi_module.h
Error Load ()
Load the .eh_frame and/or .debug_frame.
If |address_mode_| is kProcess, then .eh_frame will be loaded from the loaded segment in process
memory, and .debug_frame will never be loaded. Otherwise, the module will read from the given ELF
file on disk. Depending on the method of compilation for the particular TU of a given PC, the
.eh_frame or .debug_frame section may be used. .debug_frame is preferred and therefore inspected
first for a PC.
See the Linux Standard Base Core Specification
https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html
and a reference implementation in LLVM
https://github.com/llvm/llvm-project/blob/main/libunwind/src/DwarfParser.hpp
https://github.com/llvm/llvm-project/blob/main/libunwind/src/EHHeaderParser.hpp
Defined at line 141 of file ../../src/lib/unwinder/cfi_module.cc
fit::result<Error, bool> Step (Memory * stack, const Registers & current, Registers & next)
Unwind one frame. The returned result will contain whether or not the next frame is a signal
frame in the case of success, otherwise the Error field will be populated with additional
information.
Defined at line 339 of file ../../src/lib/unwinder/cfi_module.cc
void AsyncStep (AsyncMemory * stack, const Registers & current, fit::callback<void (Error, Registers)> cb)
Defined at line 353 of file ../../src/lib/unwinder/cfi_module.cc