LLDB mainline
ArmUnwindInfo.h
Go to the documentation of this file.
1//===-- ArmUnwindInfo.h -----------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SYMBOL_ARMUNWINDINFO_H
10#define LLDB_SYMBOL_ARMUNWINDINFO_H
11
15#include "lldb/lldb-private.h"
16#include <vector>
17
18/*
19 * Unwind information reader and parser for the ARM exception handling ABI
20 *
21 * Implemented based on:
22 * Exception Handling ABI for the ARM Architecture
23 * Document number: ARM IHI 0038A (current through ABI r2.09)
24 * Date of Issue: 25th January 2007, reissued 30th November 2012
25 * http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf
26 */
27
28namespace lldb_private {
29
31public:
32 ArmUnwindInfo(ObjectFile &objfile, lldb::SectionSP &arm_exidx,
33 lldb::SectionSP &arm_extab);
34
36
37 bool GetUnwindPlan(Target &target, const Address &addr,
38 UnwindPlan &unwind_plan);
39
40private:
42 ArmExidxEntry(uint32_t f, lldb::addr_t a, uint32_t d);
43
44 bool operator<(const ArmExidxEntry &other) const;
45
46 uint32_t file_address;
48 uint32_t data;
49 };
50
51 const uint8_t *GetExceptionHandlingTableEntry(const Address &addr);
52
53 uint8_t GetByteAtOffset(const uint32_t *data, uint16_t offset) const;
54
55 uint64_t GetULEB128(const uint32_t *data, uint16_t &offset,
56 uint16_t max_offset) const;
57
59 lldb::SectionSP m_arm_exidx_sp; // .ARM.exidx section
60 lldb::SectionSP m_arm_extab_sp; // .ARM.extab section
61 DataExtractor m_arm_exidx_data; // .ARM.exidx section data
62 DataExtractor m_arm_extab_data; // .ARM.extab section data
63 std::vector<ArmExidxEntry> m_exidx_entries;
64};
65
66} // namespace lldb_private
67
68#endif // LLDB_SYMBOL_ARMUNWINDINFO_H
A section + offset based address class.
Definition: Address.h:62
bool GetUnwindPlan(Target &target, const Address &addr, UnwindPlan &unwind_plan)
const lldb::ByteOrder m_byte_order
Definition: ArmUnwindInfo.h:58
const uint8_t * GetExceptionHandlingTableEntry(const Address &addr)
lldb::SectionSP m_arm_extab_sp
Definition: ArmUnwindInfo.h:60
uint64_t GetULEB128(const uint32_t *data, uint16_t &offset, uint16_t max_offset) const
std::vector< ArmExidxEntry > m_exidx_entries
Definition: ArmUnwindInfo.h:63
DataExtractor m_arm_exidx_data
Definition: ArmUnwindInfo.h:61
uint8_t GetByteAtOffset(const uint32_t *data, uint16_t offset) const
DataExtractor m_arm_extab_data
Definition: ArmUnwindInfo.h:62
lldb::SectionSP m_arm_exidx_sp
Definition: ArmUnwindInfo.h:59
An data extractor class.
Definition: DataExtractor.h:48
A plug-in interface definition class for object file parsers.
Definition: ObjectFile.h:44
A class that represents a running process on the host machine.
ByteOrder
Byte ordering definitions.
std::shared_ptr< lldb_private::Section > SectionSP
Definition: lldb-forward.h:418
uint64_t addr_t
Definition: lldb-types.h:80
bool operator<(const ArmExidxEntry &other) const