summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-12-05 15:30:18 +0100
committerPavel Labath <pavel@labath.sk>2019-12-06 10:26:52 +0100
commit5ee8e673135891072789f0f9bf14a5d82f0f8e01 (patch)
treeabdbbe40e2a495ae7a33337f510f2c6fc1df1dd3 /lldb/source/Plugins/SymbolFile
parent777d1f7272b52cbe372e7234a7247b189e416062 (diff)
downloadbcm5719-llvm-5ee8e673135891072789f0f9bf14a5d82f0f8e01.tar.gz
bcm5719-llvm-5ee8e673135891072789f0f9bf14a5d82f0f8e01.zip
[lldb/DWARF] Fix DW_AT_rnglists_base handling for dwo files
the value of DW_AT_rnglists_base of the skeleton unit is for that unit alone (e.g. used in DW_AT_ranges of the unit DIE) and should not apply to the split unit. The split unit has a hardcoded range list base value -- we should initialize range list code whenever we detect a nonempty debug_rnglists.dwo section.
Diffstat (limited to 'lldb/source/Plugins/SymbolFile')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
index ab8b3cfc280..35f5c30e177 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
@@ -358,10 +358,12 @@ void DWARFUnit::AddUnitDIE(const DWARFDebugInfoEntry &cu_die) {
else if (gnu_addr_base)
dwo_cu->SetAddrBase(*gnu_addr_base);
- if (ranges_base)
- dwo_cu->SetRangesBase(*ranges_base);
- else if (gnu_ranges_base)
+ if (GetVersion() <= 4 && gnu_ranges_base)
dwo_cu->SetRangesBase(*gnu_ranges_base);
+ else if (m_dwo_symbol_file->GetDWARFContext()
+ .getOrLoadRngListsData()
+ .GetByteSize() > 0)
+ dwo_cu->SetRangesBase(llvm::DWARFListTableHeader::getHeaderSize(DWARF32));
for (size_t i = 0; i < m_dwo_symbol_file->DebugInfo()->GetNumUnits(); ++i) {
DWARFUnit *unit = m_dwo_symbol_file->DebugInfo()->GetUnitAtIndex(i);
OpenPOWER on IntegriCloud