[Lldb-commits] [lldb] r245696 - Fix BuildAddressRangeTable function when no debug arranges present
Tamas Berghammer via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 21 05:14:50 PDT 2015
Author: tberghammer
Date: Fri Aug 21 07:14:50 2015
New Revision: 245696
URL: http://llvm.org/viewvc/llvm-project?rev=245696&view=rev
Log:
Fix BuildAddressRangeTable function when no debug arranges present
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp?rev=245696&r1=245695&r2=245696&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp Fri Aug 21 07:14:50 2015
@@ -383,6 +383,8 @@ DWARFCompileUnit::BuildAddressRangeTable
// 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
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
}
}
- 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.
More information about the lldb-commits
mailing list