This revision was automatically updated to reflect the committed changes. Closed by commit rG6399db2f6fd6: Trust the arange accelerator tables in dSYMs (authored by aprantl). Herald added a project: LLDB.
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68655/new/ https://reviews.llvm.org/D68655 Files: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp @@ -54,13 +54,19 @@ // Manually build arange data for everything that wasn't in the // .debug_aranges table. - const size_t num_units = GetNumUnits(); - for (size_t idx = 0; idx < num_units; ++idx) { - DWARFUnit *cu = GetUnitAtIndex(idx); - - dw_offset_t offset = cu->GetOffset(); - if (cus_with_data.find(offset) == cus_with_data.end()) - cu->BuildAddressRangeTable(m_cu_aranges_up.get()); + // + // This step is skipped for dSYMs and other debug-info-only + // objects, which are always trusted to have a complete table. + auto *obj = m_dwarf.GetObjectFile(); + if (!obj || obj->GetType() != ObjectFile::eTypeDebugInfo) { + const size_t num_units = GetNumUnits(); + for (size_t idx = 0; idx < num_units; ++idx) { + DWARFUnit *cu = GetUnitAtIndex(idx); + + dw_offset_t offset = cu->GetOffset(); + if (cus_with_data.find(offset) == cus_with_data.end()) + cu->BuildAddressRangeTable(m_cu_aranges_up.get()); + } } const bool minimize = true;
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp @@ -54,13 +54,19 @@ // Manually build arange data for everything that wasn't in the // .debug_aranges table. - const size_t num_units = GetNumUnits(); - for (size_t idx = 0; idx < num_units; ++idx) { - DWARFUnit *cu = GetUnitAtIndex(idx); - - dw_offset_t offset = cu->GetOffset(); - if (cus_with_data.find(offset) == cus_with_data.end()) - cu->BuildAddressRangeTable(m_cu_aranges_up.get()); + // + // This step is skipped for dSYMs and other debug-info-only + // objects, which are always trusted to have a complete table. + auto *obj = m_dwarf.GetObjectFile(); + if (!obj || obj->GetType() != ObjectFile::eTypeDebugInfo) { + const size_t num_units = GetNumUnits(); + for (size_t idx = 0; idx < num_units; ++idx) { + DWARFUnit *cu = GetUnitAtIndex(idx); + + dw_offset_t offset = cu->GetOffset(); + if (cus_with_data.find(offset) == cus_with_data.end()) + cu->BuildAddressRangeTable(m_cu_aranges_up.get()); + } } const bool minimize = true;
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits