1 //===-- ArmUnwindInfo.h -----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_ArmUnwindInfo_h_
11 #define liblldb_ArmUnwindInfo_h_
15 #include "lldb/Core/RangeMap.h"
16 #include "lldb/Symbol/ObjectFile.h"
17 #include "lldb/Utility/DataExtractor.h"
18 #include "lldb/lldb-private.h"
21 * Unwind information reader and parser for the ARM exception handling ABI
23 * Implemented based on:
24 * Exception Handling ABI for the ARM Architecture
25 * Document number: ARM IHI 0038A (current through ABI r2.09)
26 * Date of Issue: 25th January 2007, reissued 30th November 2012
27 * http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf
30 namespace lldb_private {
34 ArmUnwindInfo(ObjectFile &objfile, lldb::SectionSP &arm_exidx,
35 lldb::SectionSP &arm_extab);
39 bool GetUnwindPlan(Target &target, const Address &addr,
40 UnwindPlan &unwind_plan);
43 struct ArmExidxEntry {
44 ArmExidxEntry(uint32_t f, lldb::addr_t a, uint32_t d);
46 bool operator<(const ArmExidxEntry &other) const;
48 uint32_t file_address;
53 const uint8_t *GetExceptionHandlingTableEntry(const Address &addr);
55 uint8_t GetByteAtOffset(const uint32_t *data, uint16_t offset) const;
57 uint64_t GetULEB128(const uint32_t *data, uint16_t &offset,
58 uint16_t max_offset) const;
60 const lldb::ByteOrder m_byte_order;
61 lldb::SectionSP m_arm_exidx_sp; // .ARM.exidx section
62 lldb::SectionSP m_arm_extab_sp; // .ARM.extab section
63 DataExtractor m_arm_exidx_data; // .ARM.exidx section data
64 DataExtractor m_arm_extab_data; // .ARM.extab section data
65 std::vector<ArmExidxEntry> m_exidx_entries;
68 } // namespace lldb_private
70 #endif // liblldb_ArmUnwindInfo_h_