summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
index 142de7fb0eb..22e3e40dac9 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
@@ -380,8 +380,9 @@ void DWARFUnit::AddUnitDIE(const DWARFDebugInfoEntry &cu_die) {
.GetByteSize() > 0)
dwo_cu->SetRangesBase(llvm::DWARFListTableHeader::getHeaderSize(DWARF32));
- if (GetVersion() >= 5 &&
- m_dwo_symbol_file->get_debug_loclists_data().GetByteSize() > 0)
+ if (GetVersion() >= 5 && m_dwo_symbol_file->GetDWARFContext()
+ .getOrLoadLocListsData()
+ .GetByteSize() > 0)
dwo_cu->SetLoclistsBase(llvm::DWARFListTableHeader::getHeaderSize(DWARF32));
dwo_cu->SetBaseAddress(GetBaseAddress());
@@ -455,7 +456,8 @@ void DWARFUnit::SetLoclistsBase(dw_addr_t loclists_base) {
m_loclist_table_header.emplace(".debug_loclists", "locations");
uint64_t offset = loclists_base - header_size;
if (llvm::Error E = m_loclist_table_header->extract(
- m_dwarf.get_debug_loclists_data().GetAsLLVM(), &offset)) {
+ m_dwarf.GetDWARFContext().getOrLoadLocListsData().GetAsLLVM(),
+ &offset)) {
GetSymbolFileDWARF().GetObjectFile()->GetModule()->ReportError(
"Failed to extract location list table at offset 0x%" PRIx64 ": %s",
loclists_base, toString(std::move(E)).c_str());
@@ -474,8 +476,9 @@ DWARFUnit::GetLocationTable(const DataExtractor &data) const {
}
const DWARFDataExtractor &DWARFUnit::GetLocationData() const {
- return GetVersion() >= 5 ? GetSymbolFileDWARF().get_debug_loclists_data()
- : GetSymbolFileDWARF().get_debug_loc_data();
+ DWARFContext &Ctx = GetSymbolFileDWARF().GetDWARFContext();
+ return GetVersion() >= 5 ? Ctx.getOrLoadLocListsData()
+ : Ctx.getOrLoadLocData();
}
void DWARFUnit::SetRangesBase(dw_addr_t ranges_base) {
OpenPOWER on IntegriCloud