summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2015-08-21 12:14:50 +0000
committerTamas Berghammer <tberghammer@google.com>2015-08-21 12:14:50 +0000
commitf9787b40f7f9464680453befb496fc8054076de4 (patch)
tree02a6a2fb08fe1927e173a302fb3609da35e6c0f1 /lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
parent9a293accbea1d3fb2a47177a8f4096b73813ecaa (diff)
downloadbcm5719-llvm-f9787b40f7f9464680453befb496fc8054076de4.tar.gz
bcm5719-llvm-f9787b40f7f9464680453befb496fc8054076de4.zip
Fix BuildAddressRangeTable function when no debug arranges present
llvm-svn: 245696
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
index 16f1b3caf7d..5e86337d8e1 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
@@ -383,6 +383,8 @@ DWARFCompileUnit::BuildAddressRangeTable (SymbolFileDWARF* dwarf2Data,
// in order to produce a compile unit level set of address ranges that
// is accurate.
+ size_t num_debug_aranges = debug_aranges->GetNumRanges();
+
// First get the compile unit DIE only and check if it has a DW_AT_ranges
const DWARFDebugInfoEntry* die = GetCompileUnitDIEOnly();
@@ -417,7 +419,7 @@ DWARFCompileUnit::BuildAddressRangeTable (SymbolFileDWARF* dwarf2Data,
if (die)
die->BuildAddressRangeTable(dwarf2Data, this, debug_aranges);
- if (debug_aranges->IsEmpty())
+ if (debug_aranges->GetNumRanges() == num_debug_aranges)
{
// We got nothing from the functions, maybe we have a line tables only
// situation. Check the line tables and build the arange table from this.
@@ -448,7 +450,7 @@ DWARFCompileUnit::BuildAddressRangeTable (SymbolFileDWARF* dwarf2Data,
}
}
- if (debug_aranges->IsEmpty())
+ if (debug_aranges->GetNumRanges() == num_debug_aranges)
{
// We got nothing from the functions, maybe we have a line tables only
// situation. Check the line tables and build the arange table from this.
OpenPOWER on IntegriCloud