diff options
author | Christopher Ferris <cferris@google.com> | 2017-12-15 11:17:45 -0800 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2017-12-15 11:17:45 -0800 |
commit | 0140e68885e249ac2b2d6ec3cfa8cc5a1e02a8fd (patch) | |
tree | 160f72a2f6796b80b5003e761e9fe9a1bb5029cb /libunwindstack/include/unwindstack/ElfInterface.h | |
parent | 2b254247de3b7ce3d2bdf8f0b3ac682a3442edb5 (diff) | |
download | unwinding-0140e68885e249ac2b2d6ec3cfa8cc5a1e02a8fd.tar.gz |
Fix issues in libunwindstack.
- Add a load_bias field in MapInfo so that it can be loaded offline,
and also so it can be cached.
- Add an Add function to the Maps class so that it's possible to manually
create a map.
- Remove the OfflineMaps class since I haven't found a reason for this to
exist.
- Add a pointer to the gnu debugdata compressed section in the interface
itself and modify the step path to try eh_frame, then debug_frame, then
gnu_debugdata. This way arm can add exidx as the last step behind
gnu_debugdata. Add an offline test to verify the order of unwind.
- Fix x86_64_ucontext_t since it was a different size on 32 bit and 64 bit
systems.
Test: Pass new unit tests.
Change-Id: I978b70d6c244bd307c62a29886d24c1a8cb2af23
Diffstat (limited to 'libunwindstack/include/unwindstack/ElfInterface.h')
-rw-r--r-- | libunwindstack/include/unwindstack/ElfInterface.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libunwindstack/include/unwindstack/ElfInterface.h b/libunwindstack/include/unwindstack/ElfInterface.h index 5cfe74d..5d3cd5e 100644 --- a/libunwindstack/include/unwindstack/ElfInterface.h +++ b/libunwindstack/include/unwindstack/ElfInterface.h @@ -60,7 +60,8 @@ class ElfInterface { virtual bool GetFunctionName(uint64_t addr, uint64_t load_bias, std::string* name, uint64_t* offset) = 0; - virtual bool Step(uint64_t rel_pc, Regs* regs, Memory* process_memory, bool* finished); + virtual bool Step(uint64_t rel_pc, uint64_t load_bias, Regs* regs, Memory* process_memory, + bool* finished); Memory* CreateGnuDebugdataMemory(); @@ -68,6 +69,8 @@ class ElfInterface { const std::unordered_map<uint64_t, LoadInfo>& pt_loads() { return pt_loads_; } + void SetGnuDebugdataInterface(ElfInterface* interface) { gnu_debugdata_interface_ = interface; } + uint64_t dynamic_offset() { return dynamic_offset_; } uint64_t dynamic_size() { return dynamic_size_; } uint64_t eh_frame_hdr_offset() { return eh_frame_hdr_offset_; } @@ -134,6 +137,8 @@ class ElfInterface { std::unique_ptr<DwarfSection> eh_frame_; std::unique_ptr<DwarfSection> debug_frame_; + // The Elf object owns the gnu_debugdata interface object. + ElfInterface* gnu_debugdata_interface_ = nullptr; std::vector<Symbols*> symbols_; }; |