aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
index f6425a889da8..421298802645 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
@@ -399,7 +399,7 @@ bool DWARFDebugInfoEntry::GetDIENamesAndRanges(
// specification or abstract origin attributes and including those in the
// results. Any duplicate attributes will have the first instance take
// precedence (this can happen for declaration attributes).
-size_t DWARFDebugInfoEntry::GetAttributes(const DWARFUnit *cu,
+size_t DWARFDebugInfoEntry::GetAttributes(DWARFUnit *cu,
DWARFAttributes &attributes,
Recurse recurse,
uint32_t curr_depth) const {
@@ -687,13 +687,15 @@ const char *DWARFDebugInfoEntry::GetPubname(const DWARFUnit *cu) const {
/// table, except that the actual DIE offset for the function is placed in the
/// table instead of the compile unit offset.
void DWARFDebugInfoEntry::BuildFunctionAddressRangeTable(
- const DWARFUnit *cu, DWARFDebugAranges *debug_aranges) const {
+ DWARFUnit *cu, DWARFDebugAranges *debug_aranges) const {
if (m_tag) {
if (m_tag == DW_TAG_subprogram) {
- dw_addr_t lo_pc = LLDB_INVALID_ADDRESS;
- dw_addr_t hi_pc = LLDB_INVALID_ADDRESS;
- if (GetAttributeAddressRange(cu, lo_pc, hi_pc, LLDB_INVALID_ADDRESS)) {
- debug_aranges->AppendRange(GetOffset(), lo_pc, hi_pc);
+ DWARFRangeList ranges;
+ GetAttributeAddressRanges(cu, ranges,
+ /*check_hi_lo_pc=*/true);
+ for (const auto &r : ranges) {
+ debug_aranges->AppendRange(GetOffset(), r.GetRangeBase(),
+ r.GetRangeEnd());
}
}