File indexing completed on 2026-05-10 08:42:53
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_SYMBOL_UNWINDTABLE_H
0010 #define LLDB_SYMBOL_UNWINDTABLE_H
0011
0012 #include <map>
0013 #include <mutex>
0014 #include <optional>
0015
0016 #include "lldb/lldb-private.h"
0017
0018 namespace lldb_private {
0019
0020
0021
0022
0023
0024 class UnwindTable {
0025 public:
0026
0027 explicit UnwindTable(Module &module);
0028
0029 ~UnwindTable();
0030
0031 lldb_private::CallFrameInfo *GetObjectFileUnwindInfo();
0032
0033 lldb_private::DWARFCallFrameInfo *GetEHFrameInfo();
0034 lldb_private::DWARFCallFrameInfo *GetDebugFrameInfo();
0035
0036 lldb_private::CompactUnwindInfo *GetCompactUnwindInfo();
0037
0038 ArmUnwindInfo *GetArmUnwindInfo();
0039 SymbolFile *GetSymbolFile();
0040
0041 lldb::FuncUnwindersSP GetFuncUnwindersContainingAddress(const Address &addr,
0042 SymbolContext &sc);
0043
0044 bool GetAllowAssemblyEmulationUnwindPlans();
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054 lldb::FuncUnwindersSP
0055 GetUncachedFuncUnwindersContainingAddress(const Address &addr,
0056 const SymbolContext &sc);
0057
0058 ArchSpec GetArchitecture();
0059
0060
0061
0062 void ModuleWasUpdated();
0063
0064 private:
0065 void Dump(Stream &s);
0066
0067 void Initialize();
0068 std::optional<AddressRange> GetAddressRange(const Address &addr,
0069 const SymbolContext &sc);
0070
0071 typedef std::map<lldb::addr_t, lldb::FuncUnwindersSP> collection;
0072 typedef collection::iterator iterator;
0073 typedef collection::const_iterator const_iterator;
0074
0075 Module &m_module;
0076 collection m_unwinds;
0077
0078 bool m_scanned_all_unwind_sources;
0079
0080
0081
0082
0083 std::mutex m_mutex;
0084
0085 std::unique_ptr<CallFrameInfo> m_object_file_unwind_up;
0086 std::unique_ptr<DWARFCallFrameInfo> m_eh_frame_up;
0087 std::unique_ptr<DWARFCallFrameInfo> m_debug_frame_up;
0088 std::unique_ptr<CompactUnwindInfo> m_compact_unwind_up;
0089 std::unique_ptr<ArmUnwindInfo> m_arm_unwind_up;
0090
0091 UnwindTable(const UnwindTable &) = delete;
0092 const UnwindTable &operator=(const UnwindTable &) = delete;
0093 };
0094
0095 }
0096
0097 #endif