summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2016-09-15 08:53:33 +0000
committerTamas Berghammer <tberghammer@google.com>2016-09-15 08:53:33 +0000
commit2540a553e5ab66c2fa15b52edc0c22669ef53f15 (patch)
tree56d29b515178796099abd77ec992aaa86ba506e5 /lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
parent2cc4e3e04e2201d9404eae3e4e8c877c4e38ba13 (diff)
downloadbcm5719-llvm-2540a553e5ab66c2fa15b52edc0c22669ef53f15.tar.gz
bcm5719-llvm-2540a553e5ab66c2fa15b52edc0c22669ef53f15.zip
Add support for DW_AT_ranges_base attribute
It is a new attribute emitted by clang as a GNU extension and will be part of Dwarf5. The purpose of the attribute is to specify a compile unit level base value for all DW_AT_ranges to reduce the number of relocations have to be done by the linker. Fixes (at least partially): https://llvm.org/pr28826 Differential revision: https://reviews.llvm.org/D24514 llvm-svn: 281595
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index e9edee6bc73..5c8083c68ce 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -3810,7 +3810,8 @@ VariableSP SymbolFileDWARF::ParseVariableDIE(const SymbolContext &sc,
if (form_value.Form() == DW_FORM_sec_offset) {
DWARFRangeList dwarf_scope_ranges;
const DWARFDebugRanges *debug_ranges = DebugRanges();
- debug_ranges->FindRanges(form_value.Unsigned(),
+ debug_ranges->FindRanges(die.GetCU()->GetRangesBase(),
+ form_value.Unsigned(),
dwarf_scope_ranges);
// All DW_AT_start_scope are relative to the base address of the
OpenPOWER on IntegriCloud