diff options
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h index 5739c36bbacb..da79a6aaf64e 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h @@ -73,7 +73,8 @@ public: static llvm::Expected<DWARFUnitHeader> extract(const lldb_private::DWARFDataExtractor &data, DIERef::Section section, - lldb::offset_t *offset_ptr, const llvm::DWARFUnitIndex *index); + lldb_private::DWARFContext &dwarf_context, + lldb::offset_t *offset_ptr); }; class DWARFUnit : public lldb_private::UserID { @@ -84,8 +85,7 @@ public: 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, - const llvm::DWARFUnitIndex *index); + DIERef::Section section, lldb::offset_t *offset_ptr); virtual ~DWARFUnit(); bool IsDWOUnit() { return m_is_dwo; } @@ -235,15 +235,7 @@ public: /// Return a rangelist's offset based on an index. The index designates /// an entry in the rangelist table's offset array and is supplied by /// DW_FORM_rnglistx. - llvm::Optional<uint64_t> GetRnglistOffset(uint32_t Index) const { - if (!m_rnglist_table) - return llvm::None; - if (llvm::Optional<uint64_t> off = m_rnglist_table->getOffsetEntry( - m_dwarf.GetDWARFContext().getOrLoadRngListsData().GetAsLLVM(), - Index)) - return *off + m_ranges_base; - return llvm::None; - } + llvm::Expected<uint64_t> GetRnglistOffset(uint32_t Index); llvm::Optional<uint64_t> GetLoclistOffset(uint32_t Index) { if (!m_loclist_table_header) @@ -291,6 +283,8 @@ protected: return &m_die_array[0]; } + const llvm::Optional<llvm::DWARFDebugRnglistTable> &GetRnglistTable(); + SymbolFileDWARF &m_dwarf; std::shared_ptr<DWARFUnit> m_dwo; DWARFUnitHeader m_header; @@ -331,6 +325,7 @@ protected: dw_offset_t m_str_offsets_base = 0; // Value of DW_AT_str_offsets_base. llvm::Optional<llvm::DWARFDebugRnglistTable> m_rnglist_table; + bool m_rnglist_table_done = false; llvm::Optional<llvm::DWARFListTableHeader> m_loclist_table_header; const DIERef::Section m_section; |