Author: tberghammer Date: Mon Jan 11 08:56:05 2016 New Revision: 257335 URL: http://llvm.org/viewvc/llvm-project?rev=257335&view=rev Log: Don't try to parse the line table when it isn't specified
Previously we tried to parse the line table even if a compile unit had no DW_AT_stmt_list atribute. The problem happens when a compiler generates debug info for a compile unit but doesn't generate any line info. Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=257335&r1=257334&r2=257335&view=diff ============================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Mon Jan 11 08:56:05 2016 @@ -1065,12 +1065,17 @@ SymbolFileDWARF::ParseCompileUnitSupport const char * cu_comp_dir = resolveCompDir(cu_die.GetAttributeValueAsString(DW_AT_comp_dir, nullptr)); const dw_offset_t stmt_list = cu_die.GetAttributeValueAsUnsigned(DW_AT_stmt_list, DW_INVALID_OFFSET); - - // All file indexes in DWARF are one based and a file of index zero is - // supposed to be the compile unit itself. - support_files.Append (*sc.comp_unit); - - return DWARFDebugLine::ParseSupportFiles(sc.comp_unit->GetModule(), get_debug_line_data(), cu_comp_dir, stmt_list, support_files); + if (stmt_list != DW_INVALID_OFFSET) + { + // All file indexes in DWARF are one based and a file of index zero is + // supposed to be the compile unit itself. + support_files.Append (*sc.comp_unit); + return DWARFDebugLine::ParseSupportFiles(sc.comp_unit->GetModule(), + get_debug_line_data(), + cu_comp_dir, + stmt_list, + support_files); + } } } return false; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits