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, + dw_offset_t stmt_list, bool is_dwarf64, 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, - FileSpecList &support_files) { + bool is_dwarf64, FileSpecList &support_files) { lldb::offset_t data_end = debug_line_data.GetByteSize(); lldb::offset_t offset = stmt_list; @@ -475,8 +475,9 @@ // We don't parse the entire prologue, but skip the statement program. // The prologue's total_length does not include the length field itself. - // It can be 4 or 8 bytes, see DWARFDataExtractor::GetDWARFInitialLength(). - offset = prologue_start + prologue.total_length + 4; + // 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; } 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, support_files); + stmt_list, dwarf_cu->IsDWARF64(), support_files); } } }