Index: source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h +++ source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h @@ -200,7 +200,7 @@ ParseSupportFiles(const lldb::ModuleSP &module_sp, const lldb_private::DWARFDataExtractor &debug_line_data, const lldb_private::FileSpec &cu_comp_dir, - dw_offset_t stmt_list, bool is_dwarf64, + dw_offset_t stmt_list, lldb_private::FileSpecList &support_files); static bool ParsePrologue(const lldb_private::DWARFDataExtractor &debug_line_data, Index: source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp +++ source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp @@ -445,7 +445,7 @@ bool DWARFDebugLine::ParseSupportFiles( const lldb::ModuleSP &module_sp, const DWARFDataExtractor &debug_line_data, const lldb_private::FileSpec &cu_comp_dir, dw_offset_t stmt_list, - bool is_dwarf64, FileSpecList &support_files) { + FileSpecList &support_files) { lldb::offset_t data_end = debug_line_data.GetByteSize(); lldb::offset_t offset = stmt_list; @@ -473,11 +473,10 @@ support_files.Append(file_spec); } - // We don't parse the entire prologue, but skip the statement program. + // Only parse the prologue and skip the statement table. // The prologue's total_length does not include the length field itself. - // DWARF64 has an additional 8 bytes length field. - uint32_t size_of_length_field = is_dwarf64 ? 12 : 4; - offset = prologue_start + prologue.total_length + size_of_length_field; + offset = prologue_start + prologue.total_length + + debug_line_data.GetDWARFSizeofInitialLength(); } while (offset < data_end); return true; Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp =================================================================== --- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -933,7 +933,7 @@ support_files.Append(*sc.comp_unit); return DWARFDebugLine::ParseSupportFiles( sc.comp_unit->GetModule(), get_debug_line_data(), cu_comp_dir, - stmt_list, dwarf_cu->IsDWARF64(), support_files); + stmt_list, support_files); } } }