Go to the documentation of this file.
18 #include "llvm/Support/Casting.h"
34 : m_dwarf(
dwarf), m_context(context), m_units(), m_cu_aranges_up() {}
48 std::set<dw_offset_t> cus_with_data;
52 cus_with_data.insert(offset);
57 for (
size_t idx = 0; idx < num_units; ++idx) {
61 if (cus_with_data.find(offset) == cus_with_data.end())
65 const bool minimize =
true;
81 llvm::consumeError(unit_sp.takeError());
88 offset = (*unit_sp)->GetNextUnitOffset();
90 if (
auto *type_unit = llvm::dyn_cast<DWARFTypeUnit>(unit_sp->get())) {
92 unit_sp.get()->GetID());
123 auto pos = llvm::upper_bound(
124 m_units, std::make_pair(section, offset),
125 [](
const std::pair<DIERef::Section, dw_offset_t> &lhs,
127 return lhs < std::make_pair(rhs->GetDebugSection(), rhs->GetOffset());
140 if (result && result->
GetOffset() != cu_offset) {
165 std::make_pair(hash, 0u), llvm::less_first());
virtual void BuildAddressRangeTable(DWARFDebugAranges *debug_aranges)=0
Identifies a DWARF debug info entry within a given Module.
void ParseUnitHeadersIfNeeded()
uint32_t FindUnitIndex(DIERef::Section section, dw_offset_t offset)
static llvm::Expected< DWARFUnitSP > extract(SymbolFileDWARF &dwarf2Data, lldb::user_id_t uid, const lldb_private::DWARFDataExtractor &debug_info, DIERef::Section section, lldb::offset_t *offset_ptr)
std::vector< std::pair< uint64_t, uint32_t > > m_type_hash_to_unit_index
#define DW_INVALID_OFFSET
dw_offset_t die_offset() const
const DWARFDebugAranges & GetCompileUnitAranges()
llvm::once_flag m_units_once_flag
DWARFDebugInfo(SymbolFileDWARF &dwarf, lldb_private::DWARFContext &context)
DWARFTypeUnit * GetTypeUnitForHash(uint64_t hash)
SymbolFileDWARF & m_dwarf
std::shared_ptr< DWARFUnit > DWARFUnitSP
DWARFUnit * GetUnitAtIndex(size_t idx)
const DWARFDataExtractor & getOrLoadDebugInfoData()
dw_offset_t GetOffset() const
DWARFUnit * GetUnit(const DIERef &die_ref)
const DWARFDataExtractor & getOrLoadArangesData()
void ParseUnitsFor(DIERef::Section section)
DWARFUnit * GetUnitAtOffset(DIERef::Section section, dw_offset_t cu_offset, uint32_t *idx_ptr=nullptr)
DWARFUnit & GetNonSkeletonUnit()
std::unique_ptr< DWARFDebugAranges > m_cu_aranges_up
DWARFUnit * GetUnitContainingDIEOffset(DIERef::Section section, dw_offset_t die_offset)
A class that represents a running process on the host machine.
const DWARFDataExtractor & getOrLoadDebugTypesData()
bool ContainsDIEOffset(dw_offset_t die_offset) const
DWARFDIE GetDIE(const DIERef &die_ref)
lldb_private::DWARFContext & m_context
DWARFDIE GetDIE(dw_offset_t die_offset)