LLDB mainline
lldb_private::UnwindTable Class Reference

#include <UnwindTable.h>

Public Member Functions

 UnwindTable (Module &module)
 Create an Unwind table using the data in the given module.
 ~UnwindTable ()
lldb_private::CallFrameInfo * GetObjectFileUnwindInfo ()
lldb_private::DWARFCallFrameInfo * GetEHFrameInfo ()
lldb_private::DWARFCallFrameInfo * GetDebugFrameInfo ()
lldb_private::CompactUnwindInfo * GetCompactUnwindInfo ()
ArmUnwindInfo * GetArmUnwindInfo ()
SymbolFile * GetSymbolFile ()
lldb::FuncUnwindersSP GetFuncUnwindersContainingAddress (const Address &addr, const SymbolContext &sc)
Address GetFunctionStartFromObjectFileUnwindInfo (const Address &addr)
 Return the start of the function containing addr according to the object file's own unwind info (the .pdata RUNTIME_FUNCTION on PE/COFF x64), or an invalid address if there is none.
bool GetAllowAssemblyEmulationUnwindPlans ()
lldb::FuncUnwindersSP GetUncachedFuncUnwindersContainingAddress (const Address &addr, const SymbolContext &sc)
ArchSpec GetArchitecture ()
void ModuleWasUpdated ()
 Called after an ObjectFile/SymbolFile has been added to a Module to add any new unwind sections that may now be available.

Private Types

typedef std::map< lldb::addr_t, lldb::FuncUnwindersSP > collection
typedef collection::iterator iterator
typedef collection::const_iterator const_iterator

Private Member Functions

void Dump (Stream &s)
void Initialize ()
AddressRanges GetAddressRanges (const Address &addr, const SymbolContext &sc)
 UnwindTable (const UnwindTable &)=delete
const UnwindTable & operator= (const UnwindTable &)=delete

Private Attributes

Module & m_module
collection m_unwinds
std::atomic< bool > m_scanned_all_unwind_sources
 This is true when we have looked at the ObjectFile and SymbolFile for all sources of unwind information; false if we haven't done that yet, or one of the files has been updated in the Module.
std::mutex m_mutex
std::unique_ptr< CallFrameInfo > m_object_file_unwind_up
std::unique_ptr< DWARFCallFrameInfo > m_eh_frame_up
std::unique_ptr< DWARFCallFrameInfo > m_debug_frame_up
std::unique_ptr< CompactUnwindInfo > m_compact_unwind_up
std::unique_ptr< ArmUnwindInfo > m_arm_unwind_up

Detailed Description

Definition at line 25 of file UnwindTable.h.

Member Typedef Documentation

◆ collection

Definition at line 77 of file UnwindTable.h.

◆ const_iterator

typedef collection::const_iterator lldb_private::UnwindTable::const_iterator
private

Definition at line 79 of file UnwindTable.h.

◆ iterator

typedef collection::iterator lldb_private::UnwindTable::iterator
private

Definition at line 78 of file UnwindTable.h.

Constructor & Destructor Documentation

◆ UnwindTable() [1/2]

UnwindTable::UnwindTable ( Module & module)
explicit

Create an Unwind table using the data in the given module.

Definition at line 32 of file UnwindTable.cpp.

References m_arm_unwind_up, m_compact_unwind_up, m_eh_frame_up, m_module, m_mutex, m_object_file_unwind_up, m_scanned_all_unwind_sources, and m_unwinds.

Referenced by operator=(), and UnwindTable().

◆ ~UnwindTable()

UnwindTable::~UnwindTable ( )
default

◆ UnwindTable() [2/2]

lldb_private::UnwindTable::UnwindTable ( const UnwindTable & )
privatedelete

References UnwindTable().

Member Function Documentation

◆ Dump()

void UnwindTable::Dump ( Stream & s)
private

◆ GetAddressRanges()

◆ GetAllowAssemblyEmulationUnwindPlans()

bool UnwindTable::GetAllowAssemblyEmulationUnwindPlans ( )

Definition at line 229 of file UnwindTable.cpp.

References m_module.

◆ GetArchitecture()

ArchSpec UnwindTable::GetArchitecture ( )

Definition at line 227 of file UnwindTable.cpp.

References m_module.

◆ GetArmUnwindInfo()

ArmUnwindInfo * UnwindTable::GetArmUnwindInfo ( )

Definition at line 220 of file UnwindTable.cpp.

References Initialize(), and m_arm_unwind_up.

◆ GetCompactUnwindInfo()

CompactUnwindInfo * UnwindTable::GetCompactUnwindInfo ( )

Definition at line 215 of file UnwindTable.cpp.

References Initialize(), and m_compact_unwind_up.

◆ GetDebugFrameInfo()

DWARFCallFrameInfo * UnwindTable::GetDebugFrameInfo ( )

Definition at line 210 of file UnwindTable.cpp.

References Initialize(), and m_debug_frame_up.

◆ GetEHFrameInfo()

DWARFCallFrameInfo * UnwindTable::GetEHFrameInfo ( )

Definition at line 205 of file UnwindTable.cpp.

References Initialize(), and m_eh_frame_up.

◆ GetFunctionStartFromObjectFileUnwindInfo()

Address UnwindTable::GetFunctionStartFromObjectFileUnwindInfo ( const Address & addr)

Return the start of the function containing addr according to the object file's own unwind info (the .pdata RUNTIME_FUNCTION on PE/COFF x64), or an invalid address if there is none.

Definition at line 178 of file UnwindTable.cpp.

References lldb_private::AddressRange::GetBaseAddress(), Initialize(), and m_object_file_unwind_up.

◆ GetFuncUnwindersContainingAddress()

FuncUnwindersSP UnwindTable::GetFuncUnwindersContainingAddress ( const Address & addr,
const SymbolContext & sc )

◆ GetObjectFileUnwindInfo()

lldb_private::CallFrameInfo * UnwindTable::GetObjectFileUnwindInfo ( )

Definition at line 200 of file UnwindTable.cpp.

References Initialize(), and m_object_file_unwind_up.

◆ GetSymbolFile()

SymbolFile * UnwindTable::GetSymbolFile ( )

Definition at line 225 of file UnwindTable.cpp.

References m_module.

◆ GetUncachedFuncUnwindersContainingAddress()

FuncUnwindersSP UnwindTable::GetUncachedFuncUnwindersContainingAddress ( const Address & addr,
const SymbolContext & sc )

◆ Initialize()

◆ ModuleWasUpdated()

void UnwindTable::ModuleWasUpdated ( )

Called after an ObjectFile/SymbolFile has been added to a Module to add any new unwind sections that may now be available.

Definition at line 86 of file UnwindTable.cpp.

References m_mutex, m_scanned_all_unwind_sources, and m_unwinds.

◆ operator=()

const UnwindTable & lldb_private::UnwindTable::operator= ( const UnwindTable & )
privatedelete

References UnwindTable().

Member Data Documentation

◆ m_arm_unwind_up

std::unique_ptr<ArmUnwindInfo> lldb_private::UnwindTable::m_arm_unwind_up
private

Definition at line 94 of file UnwindTable.h.

Referenced by GetArmUnwindInfo(), Initialize(), and UnwindTable().

◆ m_compact_unwind_up

std::unique_ptr<CompactUnwindInfo> lldb_private::UnwindTable::m_compact_unwind_up
private

Definition at line 93 of file UnwindTable.h.

Referenced by GetCompactUnwindInfo(), Initialize(), and UnwindTable().

◆ m_debug_frame_up

std::unique_ptr<DWARFCallFrameInfo> lldb_private::UnwindTable::m_debug_frame_up
private

Definition at line 92 of file UnwindTable.h.

Referenced by GetAddressRanges(), GetDebugFrameInfo(), and Initialize().

◆ m_eh_frame_up

std::unique_ptr<DWARFCallFrameInfo> lldb_private::UnwindTable::m_eh_frame_up
private

Definition at line 91 of file UnwindTable.h.

Referenced by GetAddressRanges(), GetEHFrameInfo(), Initialize(), and UnwindTable().

◆ m_module

Module& lldb_private::UnwindTable::m_module
private

◆ m_mutex

std::mutex lldb_private::UnwindTable::m_mutex
private

◆ m_object_file_unwind_up

std::unique_ptr<CallFrameInfo> lldb_private::UnwindTable::m_object_file_unwind_up
private

◆ m_scanned_all_unwind_sources

std::atomic<bool> lldb_private::UnwindTable::m_scanned_all_unwind_sources
private

This is true when we have looked at the ObjectFile and SymbolFile for all sources of unwind information; false if we haven't done that yet, or one of the files has been updated in the Module.

Definition at line 87 of file UnwindTable.h.

Referenced by Initialize(), ModuleWasUpdated(), and UnwindTable().

◆ m_unwinds

collection lldb_private::UnwindTable::m_unwinds
private

The documentation for this class was generated from the following files: