1 //===-- Symtab.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 //===----------------------------------------------------------------------===//
11 #ifndef liblldb_UnwindTable_h
12 #define liblldb_UnwindTable_h
17 #include "lldb/lldb-private.h"
19 namespace lldb_private {
21 // A class which holds all the FuncUnwinders objects for a given ObjectFile.
22 // The UnwindTable is populated with FuncUnwinders objects lazily during
28 UnwindTable(ObjectFile& objfile);
31 lldb_private::DWARFCallFrameInfo *
34 lldb_private::CompactUnwindInfo *
35 GetCompactUnwindInfo ();
41 GetFuncUnwindersContainingAddress (const Address& addr, SymbolContext &sc);
44 GetAllowAssemblyEmulationUnwindPlans ();
46 // Normally when we create a new FuncUnwinders object we track it in this UnwindTable so it can
47 // be reused later. But for the target modules show-unwind we want to create brand new
48 // UnwindPlans for the function of interest - so ignore any existing FuncUnwinders for that
49 // function and don't add this new one to our UnwindTable.
50 // This FuncUnwinders object does have a reference to the UnwindTable but the lifetime of this
51 // uncached FuncUnwinders is expected to be short so in practice this will not be a problem.
53 GetUncachedFuncUnwindersContainingAddress (const Address& addr, SymbolContext &sc);
56 GetArchitecture (lldb_private::ArchSpec &arch);
64 typedef std::map<lldb::addr_t, lldb::FuncUnwindersSP> collection;
65 typedef collection::iterator iterator;
66 typedef collection::const_iterator const_iterator;
68 ObjectFile& m_object_file;
71 bool m_initialized; // delay some initialization until ObjectFile is set up
74 std::unique_ptr<DWARFCallFrameInfo> m_eh_frame_up;
75 std::unique_ptr<CompactUnwindInfo> m_compact_unwind_up;
76 std::unique_ptr<ArmUnwindInfo> m_arm_unwind_up;
78 DISALLOW_COPY_AND_ASSIGN (UnwindTable);
81 } // namespace lldb_private
83 #endif // liblldb_UnwindTable_h