Author: Pavel Labath Date: 2019-11-14T16:29:36+01:00 New Revision: 6e3ecd18847cb5c5bbe41d23428e1aa57ed1b339
URL: https://github.com/llvm/llvm-project/commit/6e3ecd18847cb5c5bbe41d23428e1aa57ed1b339 DIFF: https://github.com/llvm/llvm-project/commit/6e3ecd18847cb5c5bbe41d23428e1aa57ed1b339.diff LOG: [lldb] Fix dwo variant of TestLibCxxFunction The test was failing due to a bug in SymbolFileDWARF::FindFunctions -- the function was searching the main dwarf unit for DW_TAG_subprograms, but the main unit is empty in case of split dwarf. The fix is simple -- search the non-skeleton unit instead. This bug went unnoticed because this function is expensive, and so one generally avoids calling it. Added: Modified: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index c0c10b21a747..10296527a114 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -839,7 +839,8 @@ size_t SymbolFileDWARF::ParseFunctions(CompileUnit &comp_unit) { size_t functions_added = 0; std::vector<DWARFDIE> function_dies; - dwarf_cu->AppendDIEsWithTag(DW_TAG_subprogram, function_dies); + dwarf_cu->GetNonSkeletonUnit().AppendDIEsWithTag(DW_TAG_subprogram, + function_dies); for (const DWARFDIE &die : function_dies) { if (comp_unit.FindFunctionByUID(die.GetID())) continue; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits