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. llvm-svn: 257335
This commit is contained in:
parent
1395dbdbc6
commit
1966ac36a6
|
@ -1065,12 +1065,17 @@ SymbolFileDWARF::ParseCompileUnitSupportFiles (const SymbolContext& sc, FileSpec
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue