33 : m_module(module), m_unwinds(), m_scanned_all_unwind_sources(false),
34 m_mutex(), m_object_file_unwind_up(), m_eh_frame_up(),
35 m_compact_unwind_up(), m_arm_unwind_up() {}
43 std::lock_guard<std::mutex> guard(
m_mutex);
74 std::make_unique<CompactUnwindInfo>(*object_file, sect);
79 if (sect_extab.get()) {
81 std::make_unique<ArmUnwindInfo>(*object_file, sect, sect_extab);
87 std::lock_guard<std::mutex> guard(
m_mutex);
93std::optional<AddressRange>
103 if (sc.
GetAddressRange(eSymbolContextFunction | eSymbolContextSymbol, 0,
124 std::lock_guard<std::mutex> guard(
m_mutex);
131 insert_pos =
m_unwinds.lower_bound(file_addr);
135 pos->second->GetFunctionStartAddress() != addr))
138 if (pos->second->ContainsAddress(addr))
148 std::make_pair(range_or->GetBaseAddress().GetFileAddress(),
150 return func_unwinder_sp;
165 return std::make_shared<FuncUnwinders>(*
this, *range_or);
169 std::lock_guard<std::mutex> guard(
m_mutex);
174 s.
Printf(
"[%u] 0x%16.16" PRIx64
"\n", (
unsigned)std::distance(begin, pos),
211 return object_file->AllowAssemblyEmulationUnwindPlans();
A section + offset based address range class.
Address & GetBaseAddress()
Get accessor for the base address of the range.
A section + offset based address class.
lldb::addr_t GetFileAddress() const
Get the file address.
bool IsValid() const
Check if the object state is valid.
An architecture specification class.
A class that describes an executable image and its associated object and symbol files.
virtual ObjectFile * GetObjectFile()
Get the object file representation for the current architecture.
virtual SymbolFile * GetSymbolFile(bool can_create=true, Stream *feedback_strm=nullptr)
Get the module's symbol file.
const ArchSpec & GetArchitecture() const
Get const accessor for the module architecture.
virtual SectionList * GetSectionList()
Get the unified section list for the module.
const FileSpec & GetFileSpec() const
Get const accessor for the module file specification.
A plug-in interface definition class for object file parsers.
virtual std::unique_ptr< CallFrameInfo > CreateCallFrameInfo()
Creates a plugin-specific call frame info.
lldb::SectionSP FindSectionByType(lldb::SectionType sect_type, bool check_children, size_t start_idx=0) const
A stream class that can stream formatted output to a file.
void Format(const char *format, Args &&... args)
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
size_t EOL()
Output and End of Line character to the stream.
Defines a symbol context baton that can be handed other debug core functions.
bool GetAddressRange(uint32_t scope, uint32_t range_idx, bool use_inline_block_range, AddressRange &range) const
Get the address range contained within a symbol context.
Provides public interface for all SymbolFiles.
std::optional< AddressRange > GetAddressRange(const Address &addr, const SymbolContext &sc)
lldb_private::DWARFCallFrameInfo * GetEHFrameInfo()
std::unique_ptr< DWARFCallFrameInfo > m_debug_frame_up
std::unique_ptr< CallFrameInfo > m_object_file_unwind_up
bool GetAllowAssemblyEmulationUnwindPlans()
ArmUnwindInfo * GetArmUnwindInfo()
std::unique_ptr< DWARFCallFrameInfo > m_eh_frame_up
bool m_scanned_all_unwind_sources
UnwindTable(Module &module)
Create an Unwind table using the data in the given module.
std::unique_ptr< CompactUnwindInfo > m_compact_unwind_up
SymbolFile * GetSymbolFile()
ArchSpec GetArchitecture()
collection::const_iterator const_iterator
void ModuleWasUpdated()
Called after an ObjectFile/SymbolFile has been added to a Module to add any new unwind sections that ...
lldb::FuncUnwindersSP GetFuncUnwindersContainingAddress(const Address &addr, SymbolContext &sc)
lldb_private::DWARFCallFrameInfo * GetDebugFrameInfo()
lldb::FuncUnwindersSP GetUncachedFuncUnwindersContainingAddress(const Address &addr, const SymbolContext &sc)
lldb_private::CompactUnwindInfo * GetCompactUnwindInfo()
lldb_private::CallFrameInfo * GetObjectFileUnwindInfo()
collection::iterator iterator
std::unique_ptr< ArmUnwindInfo > m_arm_unwind_up
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::FuncUnwinders > FuncUnwindersSP
std::shared_ptr< lldb_private::Section > SectionSP
@ eSectionTypeDWARFDebugFrame
@ eSectionTypeCompactUnwind
compact unwind section in Mach-O, __TEXT,__unwind_info