Index: lld/test/ELF/eh-frame-hdr-augmentation.s =================================================================== --- lld/test/ELF/eh-frame-hdr-augmentation.s +++ lld/test/ELF/eh-frame-hdr-augmentation.s @@ -6,6 +6,7 @@ // CHECK: .eh_frame contents: // CHECK: 00000000 0000001c 00000000 CIE +// CHECK-NEXT: Format: DWARF32 // CHECK-NEXT: Version: 1 // CHECK-NEXT: Augmentation: "zPLR" // CHECK-NEXT: Code alignment factor: 1 @@ -20,6 +21,7 @@ // CHECK-NEXT: DW_CFA_nop: // CHECK: 00000020 00000014 00000024 FDE cie=00000000 pc=00001014...00001014 +// CHECK-NEXT: Format: DWARF32 // CHECK-NEXT: LSDA Address: 000000000000100b // CHECK-NEXT: DW_CFA_nop: // CHECK-NEXT: DW_CFA_nop: Index: llvm/include/llvm/BinaryFormat/Dwarf.h =================================================================== --- llvm/include/llvm/BinaryFormat/Dwarf.h +++ llvm/include/llvm/BinaryFormat/Dwarf.h @@ -481,6 +481,7 @@ StringRef GDBIndexEntryKindString(GDBIndexEntryKind Kind); StringRef GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage); StringRef IndexString(unsigned Idx); +StringRef FormatString(DwarfFormat Format); /// @} /// \defgroup DwarfConstantsParsing Dwarf constants parsing functions Index: llvm/lib/BinaryFormat/Dwarf.cpp =================================================================== --- llvm/lib/BinaryFormat/Dwarf.cpp +++ llvm/lib/BinaryFormat/Dwarf.cpp @@ -770,6 +770,16 @@ return ExtensionsOk; } +StringRef llvm::dwarf::FormatString(DwarfFormat Format) { + switch (Format) { + case DWARF32: + return "DWARF32"; + case DWARF64: + return "DWARF64"; + } + return StringRef(); +} + constexpr char llvm::dwarf::EnumTraits::Type[]; constexpr char llvm::dwarf::EnumTraits
::Type[]; constexpr char llvm::dwarf::EnumTraits::Type[]; Index: llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp =================================================================== --- llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp +++ llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp @@ -365,6 +365,7 @@ void DWARFDebugNames::Header::dump(ScopedPrinter &W) const { DictScope HeaderScope(W, "Header"); W.printHex("Length", UnitLength); + W.printString("Format", dwarf::FormatString(Format)); W.printNumber("Version", Version); W.printNumber("CU count", CompUnitCount); W.printNumber("Local TU count", LocalTypeUnitCount); Index: llvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp =================================================================== --- llvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp +++ llvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp @@ -18,6 +18,7 @@ int OffsetDumpWidth = 2 * dwarf::getDwarfOffsetByteSize(getFormat()); OS << format("0x%08" PRIx64, getOffset()) << ": Compile Unit:" << " length = " << format("0x%0*" PRIx64, OffsetDumpWidth, getLength()) + << " format = " << dwarf::FormatString(getFormat()) << " version = " << format("0x%04x", getVersion()); if (getVersion() >= 5) OS << " unit_type = " << dwarf::UnitTypeString(getUnitType()); Index: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp =================================================================== --- llvm/lib/DebugInfo/DWARF/DWARFContext.cpp +++ llvm/lib/DebugInfo/DWARF/DWARFContext.cpp @@ -190,7 +190,7 @@ // version field and the padding, a total of 4 bytes). Add them back in // for reporting. OS << "Contribution size = " << (Contribution->Size + (Version < 5 ? 0 : 4)) - << ", Format = " << (Format == DWARF32 ? "DWARF32" : "DWARF64") + << ", Format = " << dwarf::FormatString(Format) << ", Version = " << Version << "\n"; Offset = Contribution->Base; Index: llvm/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp =================================================================== --- llvm/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp +++ llvm/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp @@ -138,11 +138,13 @@ if (DumpOpts.Verbose) OS << format("0x%8.8" PRIx64 ": ", Offset); if (Length) { - int LengthFieldWidth = (Format == dwarf::DwarfFormat::DWARF64) ? 16 : 8; - OS << format("Address table header: length = 0x%0*" PRIx64 - ", version = 0x%4.4" PRIx16 ", addr_size = 0x%2.2" PRIx8 - ", seg_size = 0x%2.2" PRIx8 "\n", - LengthFieldWidth, Length, Version, AddrSize, SegSize); + int OffsetDumpWidth = 2 * dwarf::getDwarfOffsetByteSize(Format); + OS << "Address table header: " + << format("length = 0x%0*" PRIx64, OffsetDumpWidth, Length) + << ", format = " << dwarf::FormatString(Format) + << format(", version = 0x%4.4" PRIx16, Version) + << format(", addr_size = 0x%2.2" PRIx8, AddrSize) + << format(", seg_size = 0x%2.2" PRIx8, SegSize) << "\n"; } if (Addrs.size() > 0) { Index: llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp =================================================================== --- llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp +++ llvm/lib/DebugInfo/DWARF/DWARFDebugArangeSet.cpp @@ -160,6 +160,7 @@ int OffsetDumpWidth = 2 * dwarf::getDwarfOffsetByteSize(HeaderData.Format); OS << "Address Range Header: " << format("length = 0x%0*" PRIx64 ", ", OffsetDumpWidth, HeaderData.Length) + << "format = " << dwarf::FormatString(HeaderData.Format) << ", " << format("version = 0x%4.4x, ", HeaderData.Version) << format("cu_offset = 0x%0*" PRIx64 ", ", OffsetDumpWidth, HeaderData.CuOffset) Index: llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp =================================================================== --- llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp +++ llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp @@ -308,9 +308,11 @@ << format(" %0*" PRIx64, IsDWARF64 ? 16 : 8, Length) << format(" %0*" PRIx64, IsDWARF64 && !IsEH ? 16 : 8, getCIEId(IsDWARF64, IsEH)) - << " CIE\n"; - OS << format(" Version: %d\n", Version); - OS << " Augmentation: \"" << Augmentation << "\"\n"; + << " CIE\n" + << " Format: " << (IsDWARF64 ? "DWARF64" : "DWARF32") + << "\n" + << format(" Version: %d\n", Version) + << " Augmentation: \"" << Augmentation << "\"\n"; if (Version >= 4) { OS << format(" Address size: %u\n", (uint32_t)AddressSize); OS << format(" Segment desc size: %u\n", @@ -343,6 +345,7 @@ OS << ""; OS << format(" pc=%08" PRIx64 "...%08" PRIx64 "\n", InitialLocation, InitialLocation + AddressRange); + OS << " Format: " << (IsDWARF64 ? "DWARF64" : "DWARF32") << "\n"; if (LSDAAddress) OS << format(" LSDA Address: %016" PRIx64 "\n", *LSDAAddress); CFIs.dump(OS, MRI, IsEH); Index: llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp =================================================================== --- llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp +++ llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp @@ -110,6 +110,7 @@ OS << "Line table prologue:\n" << format(" total_length: 0x%0*" PRIx64 "\n", OffsetDumpWidth, TotalLength) + << " format: " << dwarf::FormatString(FormParams.Format) << "\n" << format(" version: %u\n", getVersion()); if (!versionIsSupported(getVersion())) return; Index: llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp =================================================================== --- llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp +++ llvm/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp @@ -52,6 +52,7 @@ for (const Set &S : Sets) { int OffsetDumpWidth = 2 * dwarf::getDwarfOffsetByteSize(S.Format); OS << "length = " << format("0x%0*" PRIx64, OffsetDumpWidth, S.Length); + OS << " format = " << dwarf::FormatString(S.Format); OS << " version = " << format("0x%04x", S.Version); OS << " unit_offset = " << format("0x%0*" PRIx64, OffsetDumpWidth, S.Offset); Index: llvm/lib/DebugInfo/DWARF/DWARFListTable.cpp =================================================================== --- llvm/lib/DebugInfo/DWARF/DWARFListTable.cpp +++ llvm/lib/DebugInfo/DWARF/DWARFListTable.cpp @@ -80,11 +80,12 @@ if (DumpOpts.Verbose) OS << format("0x%8.8" PRIx64 ": ", HeaderOffset); int OffsetDumpWidth = 2 * dwarf::getDwarfOffsetByteSize(Format); - OS << format("%s list header: length = 0x%0*" PRIx64 - ", version = 0x%4.4" PRIx16 ", addr_size = 0x%2.2" PRIx8 + OS << format("%s list header: length = 0x%0*" PRIx64, ListTypeString.data(), + OffsetDumpWidth, HeaderData.Length) + << ", format = " << dwarf::FormatString(Format) + << format(", version = 0x%4.4" PRIx16 ", addr_size = 0x%2.2" PRIx8 ", seg_size = 0x%2.2" PRIx8 ", offset_entry_count = 0x%8.8" PRIx32 "\n", - ListTypeString.data(), OffsetDumpWidth, HeaderData.Length, HeaderData.Version, HeaderData.AddrSize, HeaderData.SegSize, HeaderData.OffsetEntryCount); Index: llvm/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp =================================================================== --- llvm/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp +++ llvm/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp @@ -32,6 +32,7 @@ OS << format("0x%08" PRIx64, getOffset()) << ": Type Unit:" << " length = " << format("0x%0*" PRIx64, OffsetDumpWidth, getLength()) + << " format = " << dwarf::FormatString(getFormat()) << " version = " << format("0x%04x", getVersion()); if (getVersion() >= 5) OS << " unit_type = " << dwarf::UnitTypeString(getUnitType()); Index: llvm/test/CodeGen/X86/debug-loclists.ll =================================================================== --- llvm/test/CodeGen/X86/debug-loclists.ll +++ llvm/test/CodeGen/X86/debug-loclists.ll @@ -21,10 +21,10 @@ ; CHECK-NEXT: DW_AT_name {{.*}} "r" ; CHECK: .debug_loclists contents: -; CHECK-NEXT: 0x00000000: locations list header: length = 0x00000035, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000003 +; CHECK-NEXT: 0x00000000: locations list header: length = 0x00000035, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000003 ; DWO: .debug_loclists.dwo contents: -; DWO-NEXT: 0x00000000: locations list header: length = 0x00000035, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000003 +; DWO-NEXT: 0x00000000: locations list header: length = 0x00000035, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000003 ; CHECK-NEXT: offsets: [ ; CHECK-NEXT: 0x0000000c => 0x00000018 Index: llvm/test/DebugInfo/RISCV/dwarf-riscv-relocs.ll =================================================================== --- llvm/test/DebugInfo/RISCV/dwarf-riscv-relocs.ll +++ llvm/test/DebugInfo/RISCV/dwarf-riscv-relocs.ll @@ -37,6 +37,7 @@ ; DWARF-DUMP-NEXT: debug_line[0x00000000] ; DWARF-DUMP-NEXT: Line table prologue: ; DWARF-DUMP-NEXT: total_length: 0x0000005f +; DWARF-DUMP-NEXT: format: DWARF32 ; DWARF-DUMP-NEXT: version: 5 ; DWARF-DUMP-NEXT: address_size: 4 ; DWARF-DUMP-NEXT: seg_select_size: 0 Index: llvm/test/DebugInfo/X86/debug-frame-dwarf64.s =================================================================== --- llvm/test/DebugInfo/X86/debug-frame-dwarf64.s +++ llvm/test/DebugInfo/X86/debug-frame-dwarf64.s @@ -3,6 +3,7 @@ # RUN: FileCheck %s # CHECK: 00000000 0000000000000010 ffffffffffffffff CIE +# CHECK-NEXT: Format: DWARF64 # CHECK-NEXT: Version: 4 # CHECK-NEXT: Augmentation: "" # CHECK-NEXT: Address size: 8 @@ -14,6 +15,7 @@ # CHECK-NEXT: DW_CFA_nop: # CHECK: 0000001c 0000000000000018 0000000000000000 FDE cie=00000000 pc=00112233...00122233 +# CHECK-NEXT: Format: DWARF64 .section .debug_frame, "", @progbits .LCIE: Index: llvm/test/DebugInfo/X86/debug_addr.ll =================================================================== --- llvm/test/DebugInfo/X86/debug_addr.ll +++ llvm/test/DebugInfo/X86/debug_addr.ll @@ -38,7 +38,7 @@ ; DWARF5: DW_AT_low_pc [DW_FORM_addrx] (indexed (00000000) address = 0x0000000000000000 ".text") ; DWARF5: DW_AT_call_return_pc [DW_FORM_addrx] (indexed (00000002) address = 0x0000000000000018 ".text") ; DWARF5: .debug_addr contents: -; DWARF5-NEXT: 0x00000000: Address table header: length = 0x00000010, version = 0x0005, addr_size = 0x04, seg_size = 0x00 +; DWARF5-NEXT: 0x00000000: Address table header: length = 0x00000010, format = DWARF32, version = 0x0005, addr_size = 0x04, seg_size = 0x00 ; DWARF5-NEXT: Addrs: [ ; DWARF5-NEXT: 0x00000000 ; DWARF5-NEXT: 0x00000010 Index: llvm/test/DebugInfo/X86/dwarfdump-debug-aranges.s =================================================================== --- llvm/test/DebugInfo/X86/dwarfdump-debug-aranges.s +++ llvm/test/DebugInfo/X86/dwarfdump-debug-aranges.s @@ -68,6 +68,7 @@ .long 0xffffffff # DWARF64 mark .quad .L4end - .L4version # Length # CHECK: Address Range Header: length = 0x000000000000001c, +# CHECK-SAME: format = DWARF64, .L4version: .short 2 # Version .quad 0x123456789abc # Debug Info Offset Index: llvm/test/DebugInfo/X86/dwarfdump-debug-loclists-dwarf64.s =================================================================== --- llvm/test/DebugInfo/X86/dwarfdump-debug-loclists-dwarf64.s +++ llvm/test/DebugInfo/X86/dwarfdump-debug-loclists-dwarf64.s @@ -5,6 +5,7 @@ # CHECK: .debug_loclists contents: # CHECK-NEXT: locations list header: # CHECK-SAME: length = 0x0000000000000028, +# CHECK-SAME: format = DWARF64, # CHECK-SAME: version = 0x0005, # CHECK-SAME: addr_size = 0x08, # CHECK-SAME: seg_size = 0x00, Index: llvm/test/DebugInfo/X86/dwarfdump-debug-loclists.test =================================================================== --- llvm/test/DebugInfo/X86/dwarfdump-debug-loclists.test +++ llvm/test/DebugInfo/X86/dwarfdump-debug-loclists.test @@ -9,7 +9,7 @@ # CHECK-NEXT: [0x0000000000000700, 0x0000000000000710): DW_OP_breg5 RDI+0 # CHECK: .debug_loclists contents: -# CHECK-NEXT: 0x00000000: locations list header: length = 0x0000002c, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# CHECK-NEXT: 0x00000000: locations list header: length = 0x0000002c, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # CHECK-NEXT: 0x0000000c: # CHECK-NEXT: DW_LLE_offset_pair (0x0000000000000000, 0x0000000000000010): DW_OP_breg5 RDI+0 # CHECK-NEXT: DW_LLE_base_address (0x0000000000000500) Index: llvm/test/DebugInfo/X86/dwarfdump-debug-names.s =================================================================== --- llvm/test/DebugInfo/X86/dwarfdump-debug-names.s +++ llvm/test/DebugInfo/X86/dwarfdump-debug-names.s @@ -137,6 +137,7 @@ # CHECK-NEXT: Name Index @ 0x0 { # CHECK-NEXT: Header { # CHECK-NEXT: Length: 0x60 +# CHECK-NEXT: Format: DWARF32 # CHECK-NEXT: Version: 5 # CHECK-NEXT: CU count: 1 # CHECK-NEXT: Local TU count: 0 @@ -182,6 +183,7 @@ # CHECK-NEXT: Name Index @ 0x64 { # CHECK-NEXT: Header { # CHECK-NEXT: Length: 0x44 +# CHECK-NEXT: Format: DWARF32 # CHECK-NEXT: Version: 5 # CHECK-NEXT: CU count: 1 # CHECK-NEXT: Local TU count: 0 @@ -215,6 +217,7 @@ # CHECK-NEXT: Name Index @ 0xac { # CHECK-NEXT: Header { # CHECK-NEXT: Length: 0x68 +# CHECK-NEXT: Format: DWARF64 # CHECK-NEXT: Version: 5 # CHECK-NEXT: CU count: 1 # CHECK-NEXT: Local TU count: 1 Index: llvm/test/DebugInfo/X86/dwarfdump-debug-pubnames.s =================================================================== --- llvm/test/DebugInfo/X86/dwarfdump-debug-pubnames.s +++ llvm/test/DebugInfo/X86/dwarfdump-debug-pubnames.s @@ -4,6 +4,7 @@ # CHECK: .debug_pubnames contents: # CHECK-NEXT: length = 0x0000000000000032 +# CHECK-SAME: format = DWARF64 # CHECK-SAME: version = 0x0002 # CHECK-SAME: unit_offset = 0x0000112233445566 # CHECK-SAME: unit_size = 0x0000110022003300 Index: llvm/test/DebugInfo/X86/dwarfdump-header-64.s =================================================================== --- llvm/test/DebugInfo/X86/dwarfdump-header-64.s +++ llvm/test/DebugInfo/X86/dwarfdump-header-64.s @@ -76,7 +76,7 @@ CU_5_end: # CHECK-LABEL: .debug_info contents: -# CHECK: 0x00000000: Compile Unit: length = 0x00000016 version = 0x0005 unit_type = DW_UT_compile abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x0000001a) +# CHECK: 0x00000000: Compile Unit: length = 0x00000016 format = DWARF32 version = 0x0005 unit_type = DW_UT_compile abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x0000001a) # CHECK: 0x0000000c: DW_TAG_compile_unit # CHECK-NEXT: DW_AT_producer {{.*}} "Handmade DWARF producer" # CHECK-NEXT: DW_AT_name {{.*}} "V5_compile_unit" Index: llvm/test/DebugInfo/X86/dwarfdump-header.s =================================================================== --- llvm/test/DebugInfo/X86/dwarfdump-header.s +++ llvm/test/DebugInfo/X86/dwarfdump-header.s @@ -107,7 +107,7 @@ .byte 0 # NULL CU_4_end: -# CHECK: 0x00000000: Compile Unit: length = 0x00000015 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000019) +# CHECK: 0x00000000: Compile Unit: length = 0x00000015 format = DWARF32 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000019) # CHECK: 0x0000000b: DW_TAG_compile_unit # DWARF v5 normal CU header. @@ -125,7 +125,7 @@ .byte 0 # NULL CU_5_end: -# CHECK: 0x00000019: Compile Unit: length = 0x00000016 version = 0x0005 unit_type = DW_UT_compile abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000033) +# CHECK: 0x00000019: Compile Unit: length = 0x00000016 format = DWARF32 version = 0x0005 unit_type = DW_UT_compile abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000033) # CHECK: 0x00000025: DW_TAG_compile_unit .section .debug_info.dwo,"e",@progbits @@ -147,7 +147,7 @@ .byte 0 # NULL CU_split_5_end: -# CHECK: 0x00000000: Compile Unit: length = 0x0000001e version = 0x0005 unit_type = DW_UT_split_compile abbr_offset = 0x0000 addr_size = 0x08 DWO_id = 0x000000000000005a (next unit at 0x00000022) +# CHECK: 0x00000000: Compile Unit: length = 0x0000001e format = DWARF32 version = 0x0005 unit_type = DW_UT_split_compile abbr_offset = 0x0000 addr_size = 0x08 DWO_id = 0x000000000000005a (next unit at 0x00000022) # CHECK: 0x00000014: DW_TAG_compile_unit # CHECK-NEXT: DW_AT_producer {{.*}} "Handmade DWO producer" # CHECK-NEXT: DW_AT_name {{.*}} "V5_dwo_compile_unit" @@ -181,7 +181,7 @@ .byte 0 # NULL TU_split_5_end: -# CHECK: 0x00000000: Type Unit: length = 0x00000020 version = 0x0005 unit_type = DW_UT_split_type abbr_offset = 0x0000 addr_size = 0x08 name = 'V5_split_type_unit' type_signature = 0x8899aabbccddeeff type_offset = 0x001d (next unit at 0x00000024) +# CHECK: 0x00000000: Type Unit: length = 0x00000020 format = DWARF32 version = 0x0005 unit_type = DW_UT_split_type abbr_offset = 0x0000 addr_size = 0x08 name = 'V5_split_type_unit' type_signature = 0x8899aabbccddeeff type_offset = 0x001d (next unit at 0x00000024) # CHECK: 0x00000018: DW_TAG_type_unit .section .debug_types,"",@progbits @@ -207,7 +207,7 @@ .byte 0 # NULL TU_4_end: -# CHECK: 0x00000000: Type Unit: length = 0x0000001f version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 name = 'V4_type_unit' type_signature = 0x0011223344556677 type_offset = 0x001c (next unit at 0x00000023) +# CHECK: 0x00000000: Type Unit: length = 0x0000001f format = DWARF32 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 name = 'V4_type_unit' type_signature = 0x0011223344556677 type_offset = 0x001c (next unit at 0x00000023) # CHECK: 0x00000017: DW_TAG_type_unit .section .debug_line,"",@progbits Index: llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s =================================================================== --- llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s +++ llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s @@ -44,6 +44,7 @@ # PART1: Line table prologue: # PART1-NEXT: total_length: 0x0000002e +# PART1-NEXT: format: DWARF32 # PART1-NEXT: version: 4 # PART1-NEXT: prologue_length: 0x00000028 # PART1: include_directories[ 1] = "Directory1" @@ -90,6 +91,7 @@ # PART2: Line table prologue: # PART2-NEXT: total_length: 0x00000028 +# PART2-NEXT: format: DWARF32 # PART2-NEXT: version: 4 # PART2-NEXT: prologue_length: 0x00000022 # PART2-NOT: prologue: Index: llvm/test/DebugInfo/X86/dwarfdump-rnglists-dwarf64.s =================================================================== --- llvm/test/DebugInfo/X86/dwarfdump-rnglists-dwarf64.s +++ llvm/test/DebugInfo/X86/dwarfdump-rnglists-dwarf64.s @@ -216,6 +216,7 @@ # RNGLISTS: .debug_rnglists contents: # RNGLISTS: range list header: # RNGLISTS-SAME: length = 0x0000000000000031, +# RNGLISTS-SAME: format = DWARF64, # RNGLISTS-SAME: version = 0x0005, # RNGLISTS-SAME: addr_size = 0x04, # RNGLISTS-SAME: seg_size = 0x00, @@ -234,6 +235,7 @@ # RNGLISTS: .debug_rnglists.dwo contents: # RNGLISTS: range list header: # RNGLISTS-SAME: length = 0x0000000000000022, +# RNGLISTS-SAME: format = DWARF64, # RNGLISTS-SAME: version = 0x0005, # RNGLISTS-SAME: addr_size = 0x04, # RNGLISTS-SAME: seg_size = 0x00, Index: llvm/test/DebugInfo/X86/fission-ranges.ll =================================================================== --- llvm/test/DebugInfo/X86/fission-ranges.ll +++ llvm/test/DebugInfo/X86/fission-ranges.ll @@ -81,7 +81,7 @@ ; V5RNGLISTS-NOT: DW_TAG ; V5RNGLISTS: DW_AT_rnglists_base [DW_FORM_sec_offset] (0x0000000c) ; V5RNGLISTS: .debug_rnglists contents: -; V5RNGLISTS-NEXT: 0x00000000: range list header: length = 0x00000019, version = 0x0005, +; V5RNGLISTS-NEXT: 0x00000000: range list header: length = 0x00000019, format = DWARF32, version = 0x0005, ; V5RNGLISTS-SAME: addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000001 ; V5RNGLISTS-NEXT: offsets: [ ; V5RNGLISTS-NEXT: => 0x00000010 Index: llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll =================================================================== --- llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll +++ llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll @@ -21,7 +21,7 @@ ; GPUB-NEXT: "f3" ; GPUB: .debug_gnu_pubtypes contents: -; GPUB-NEXT: length = 0x0000000e version = 0x0002 unit_offset = 0x00000000 +; GPUB-NEXT: length = 0x0000000e format = DWARF32 version = 0x0002 unit_offset = 0x00000000 ; GPUB-NEXT: Name ; NONE-NOT: .debug_pubnames contents: Index: llvm/test/DebugInfo/X86/rnglists_curanges.ll =================================================================== --- llvm/test/DebugInfo/X86/rnglists_curanges.ll +++ llvm/test/DebugInfo/X86/rnglists_curanges.ll @@ -16,7 +16,7 @@ ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_rnglists_base [DW_FORM_sec_offset] (0x0000000c) ; CHECK: .debug_rnglists contents: -; CHECK: 0x00000000: range list header: length = 0x00000013, version = 0x0005, +; CHECK: 0x00000000: range list header: length = 0x00000013, format = DWARF32, version = 0x0005, ; CHECK-SAME: addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000001 ; Function Attrs: noinline nounwind optnone uwtable Index: llvm/test/DebugInfo/X86/split-dwarf-v5-ranges.ll =================================================================== --- llvm/test/DebugInfo/X86/split-dwarf-v5-ranges.ll +++ llvm/test/DebugInfo/X86/split-dwarf-v5-ranges.ll @@ -8,7 +8,7 @@ ; CHECK: [0x000000000000000e, 0x0000000000000013) ".text") ; CHECK: .debug_rnglists.dwo contents: -; CHECK: 0x00000000: range list header: length = 0x00000015, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000001 +; CHECK: 0x00000000: range list header: length = 0x00000015, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000001 ; CHECK: offsets: [ ; CHECK: 0x00000004 => 0x00000010 ; CHECK: ] Index: llvm/test/DebugInfo/dwarfdump-pubnames.test =================================================================== --- llvm/test/DebugInfo/dwarfdump-pubnames.test +++ llvm/test/DebugInfo/dwarfdump-pubnames.test @@ -2,7 +2,7 @@ RUN: --debug-pubnames | FileCheck %s CHECK: .debug_pubnames contents: -CHECK: length = 0x000000a1 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000141 +CHECK: length = 0x000000a1 format = DWARF32 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000141 CHECK: Offset Name CHECK: 0x00000098 "global_namespace_variable" Index: llvm/test/DebugInfo/dwarfdump-zlib.test =================================================================== --- llvm/test/DebugInfo/dwarfdump-zlib.test +++ llvm/test/DebugInfo/dwarfdump-zlib.test @@ -10,7 +10,7 @@ // the decompression correctly and result is the same. This and above also checks // that sections names are properly shown in zlib-gnu style (without additional 'z' prefix). CHECK: .debug_info contents -CHECK: 0x00000000: Compile Unit: length = 0x00000144 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000148) +CHECK: 0x00000000: Compile Unit: length = 0x00000144 format = DWARF32 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000148) // Also check that relocations in the .zdebug sections are handled correctly: CHECK: DW_AT_ranges {{.*}} (0x00000000{{$}} Index: llvm/test/DebugInfo/typeunit-header.test =================================================================== --- llvm/test/DebugInfo/typeunit-header.test +++ llvm/test/DebugInfo/typeunit-header.test @@ -10,6 +10,6 @@ and displays it. CHECK: .debug_types contents: -CHECK: 0x00000000: Type Unit: length = 0x00000019 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 name = '' type_signature = 0x0011223344556677 type_offset = 0x0019 (next unit at 0x0000001d) +CHECK: 0x00000000: Type Unit: length = 0x00000019 format = DWARF32 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 name = '' type_signature = 0x0011223344556677 type_offset = 0x0019 (next unit at 0x0000001d) CHECK: 0x00000017: DW_TAG_type_unit [1] * CHECK: DW_AT_visibility [DW_FORM_data1] (DW_VIS_local) Index: llvm/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s =================================================================== --- llvm/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s +++ llvm/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s @@ -34,7 +34,7 @@ // DWARF: .debug_aranges contents: -// DWARF-NEXT: Address Range Header: length = 0x00000024, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00 +// DWARF-NEXT: Address Range Header: length = 0x00000024, format = DWARF32, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00 // DWARF-NEXT: [0x00000000, 0x00000004) // DWARF-NEXT: [0x00000000, 0x00000004) Index: llvm/test/MC/ARM/dwarf-asm-multiple-sections.s =================================================================== --- llvm/test/MC/ARM/dwarf-asm-multiple-sections.s +++ llvm/test/MC/ARM/dwarf-asm-multiple-sections.s @@ -49,7 +49,7 @@ // DWARF: .debug_aranges contents: -// DWARF-NEXT: Address Range Header: length = 0x00000024, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00 +// DWARF-NEXT: Address Range Header: length = 0x00000024, format = DWARF32, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00 // DWARF-NEXT: [0x00000000, 0x00000004) // DWARF-NEXT: [0x00000000, 0x00000004) @@ -78,7 +78,7 @@ // DWARF34-NEXT: 00000000 // DWARF5: .debug_rnglists contents: -// DWARF5-NEXT: 0x00000000: range list header: length = 0x00000015, version = 0x0005, addr_size = 0x04, seg_size = 0x00, offset_entry_count = 0x00000000 +// DWARF5-NEXT: 0x00000000: range list header: length = 0x00000015, format = DWARF32, version = 0x0005, addr_size = 0x04, seg_size = 0x00, offset_entry_count = 0x00000000 // DWARF5-NEXT: ranges: // DWARF5-NEXT: 0x0000000c: [DW_RLE_start_length]: 0x00000000, 0x00000004 => [0x00000000, 0x00000004) // DWARF5-NEXT: 0x00000012: [DW_RLE_start_length]: 0x00000000, 0x00000004 => [0x00000000, 0x00000004) Index: llvm/test/MC/ARM/dwarf-asm-nonstandard-section.s =================================================================== --- llvm/test/MC/ARM/dwarf-asm-nonstandard-section.s +++ llvm/test/MC/ARM/dwarf-asm-nonstandard-section.s @@ -28,7 +28,7 @@ // DWARF: .debug_aranges contents: -// DWARF-NEXT: Address Range Header: length = 0x0000001c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00 +// DWARF-NEXT: Address Range Header: length = 0x0000001c, format = DWARF32, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00 // DWARF-NEXT: [0x00000000, 0x00000004) Index: llvm/test/MC/ARM/dwarf-asm-single-section.s =================================================================== --- llvm/test/MC/ARM/dwarf-asm-single-section.s +++ llvm/test/MC/ARM/dwarf-asm-single-section.s @@ -29,7 +29,7 @@ // DWARF: .debug_aranges contents: -// DWARF-NEXT: Address Range Header: length = 0x0000001c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00 +// DWARF-NEXT: Address Range Header: length = 0x0000001c, format = DWARF32, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00 // DWARF-NEXT: [0x00000000, 0x00000004) // DWARF: .debug_line contents: Index: llvm/test/MC/MachO/gen-dwarf.s =================================================================== --- llvm/test/MC/MachO/gen-dwarf.s +++ llvm/test/MC/MachO/gen-dwarf.s @@ -84,7 +84,7 @@ // CHECK: NULL // CHECK: .debug_aranges contents: -// CHECK: Address Range Header: length = 0x0000001c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00 +// CHECK: Address Range Header: length = 0x0000001c, format = DWARF32, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x04, seg_size = 0x00 // CHECK: .debug_line contents: // CHECK: Line table prologue: Index: llvm/test/MC/Mips/eh-frame.s =================================================================== --- llvm/test/MC/Mips/eh-frame.s +++ llvm/test/MC/Mips/eh-frame.s @@ -55,6 +55,7 @@ // RELOCS-NEXT: } // DWARF32: 00000000 00000010 00000000 CIE +// DWARF32-NEXT: Format: DWARF32 // DWARF32-NEXT: Version: 1 // DWARF32-NEXT: Augmentation: "zR" // DWARF32-NEXT: Code alignment factor: 1 @@ -68,12 +69,14 @@ // DWARF32-NEXT: DW_CFA_def_cfa_register: reg29 // // DWARF32: 00000014 00000010 00000018 FDE cie=00000000 pc=00000000...00000000 +// DWARF32-NEXT: Format: DWARF32 // DWARF32-NEXT: DW_CFA_nop: // DWARF32-NEXT: DW_CFA_nop: // DWARF32-NEXT: DW_CFA_nop: // DWARF64: 00000000 00000010 00000000 CIE +// DWARF64-NEXT: Format: DWARF32 // DWARF64-NEXT: Version: 1 // DWARF64-NEXT: Augmentation: "zR" // DWARF64-NEXT: Code alignment factor: 1 @@ -91,6 +94,7 @@ // // DWARF64_ABS: 00000014 00000018 00000018 FDE cie=00000000 pc=00000000...00000000 // DWARF64_PIC: 00000014 00000010 00000018 FDE cie=00000000 pc=00000000...00000000 +// DWARF64-NEXT: Format: DWARF32 // DWARF64-NEXT: DW_CFA_nop: // DWARF64-NEXT: DW_CFA_nop: // DWARF64-NEXT: DW_CFA_nop: Index: llvm/test/MC/WebAssembly/dwarfdump.ll =================================================================== --- llvm/test/MC/WebAssembly/dwarfdump.ll +++ llvm/test/MC/WebAssembly/dwarfdump.ll @@ -1,7 +1,7 @@ ; RUN: llc -filetype=obj %s -o - | llvm-dwarfdump - | FileCheck %s ; CHECK: .debug_info contents: -; CHECK-NEXT: 0x00000000: Compile Unit: length = 0x0000006e version = 0x0004 abbr_offset = 0x0000 addr_size = 0x04 (next unit at 0x00000072) +; CHECK-NEXT: 0x00000000: Compile Unit: length = 0x0000006e format = DWARF32 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x04 (next unit at 0x00000072) ; CHECK: 0x0000000b: DW_TAG_compile_unit ; CHECK-NEXT: DW_AT_producer ("clang version 6.0.0 (trunk 315924) (llvm/trunk 315960)") Index: llvm/test/tools/dsymutil/ARM/obfuscated.test =================================================================== --- llvm/test/tools/dsymutil/ARM/obfuscated.test +++ llvm/test/tools/dsymutil/ARM/obfuscated.test @@ -119,19 +119,19 @@ CHECK: length: 0x00000000 CHECK: .debug_pubnames contents: -CHECK: length = 0x00000017 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000044 +CHECK: length = 0x00000017 format = DWARF32 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000044 CHECK: 0x0000002e "main" -CHECK: length = 0x00000016 version = 0x0002 unit_offset = 0x00000044 unit_size = 0x00000044 +CHECK: length = 0x00000016 format = DWARF32 version = 0x0002 unit_offset = 0x00000044 unit_size = 0x00000044 CHECK: 0x0000002e "one" -CHECK: length = 0x00000016 version = 0x0002 unit_offset = 0x00000088 unit_size = 0x00000044 +CHECK: length = 0x00000016 format = DWARF32 version = 0x0002 unit_offset = 0x00000088 unit_size = 0x00000044 CHECK: 0x0000002e "two" -CHECK: length = 0x00000018 version = 0x0002 unit_offset = 0x000000cc unit_size = 0x00000044 +CHECK: length = 0x00000018 format = DWARF32 version = 0x0002 unit_offset = 0x000000cc unit_size = 0x00000044 CHECK: 0x0000002e "three" -CHECK: length = 0x00000017 version = 0x0002 unit_offset = 0x00000110 unit_size = 0x00000044 +CHECK: length = 0x00000017 format = DWARF32 version = 0x0002 unit_offset = 0x00000110 unit_size = 0x00000044 CHECK: 0x0000002e "four" -CHECK: length = 0x00000017 version = 0x0002 unit_offset = 0x00000154 unit_size = 0x00000044 +CHECK: length = 0x00000017 format = DWARF32 version = 0x0002 unit_offset = 0x00000154 unit_size = 0x00000044 CHECK: 0x0000002e "five" -CHECK: length = 0x00000016 version = 0x0002 unit_offset = 0x00000198 unit_size = 0x00000044 +CHECK: length = 0x00000016 format = DWARF32 version = 0x0002 unit_offset = 0x00000198 unit_size = 0x00000044 CHECK: 0x0000002e "six" CHECK: .apple_names contents: Index: llvm/test/tools/dsymutil/X86/basic-linking-x86.test =================================================================== --- llvm/test/tools/dsymutil/X86/basic-linking-x86.test +++ llvm/test/tools/dsymutil/X86/basic-linking-x86.test @@ -143,12 +143,12 @@ CHECK-NOT: .debug_loc contents CHECK:.debug_aranges contents: -CHECK-NEXT:Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00 +CHECK-NEXT:Address Range Header: length = 0x0000002c, format = DWARF32, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00 CHECK-NEXT:[0x0000000100000ea0, 0x0000000100000ec4) -CHECK-NEXT:Address Range Header: length = 0x0000003c, version = 0x0002, cu_offset = 0x00000081, addr_size = 0x08, seg_size = 0x00 +CHECK-NEXT:Address Range Header: length = 0x0000003c, format = DWARF32, version = 0x0002, cu_offset = 0x00000081, addr_size = 0x08, seg_size = 0x00 CHECK-NEXT:[0x0000000100000ed0, 0x0000000100000f19) CHECK-NEXT:[0x0000000100000f20, 0x0000000100000f37) -CHECK-NEXT:Address Range Header: length = 0x0000003c, version = 0x0002, cu_offset = 0x00000126, addr_size = 0x08, seg_size = 0x00 +CHECK-NEXT:Address Range Header: length = 0x0000003c, format = DWARF32, version = 0x0002, cu_offset = 0x00000126, addr_size = 0x08, seg_size = 0x00 CHECK-NEXT:[0x0000000100000f40, 0x0000000100000f84) CHECK-NEXT:[0x0000000100000f90, 0x0000000100000fa9) @@ -190,29 +190,29 @@ CHECK-NEXT: 0x0000000100000fa9 12 0 1 0 0 is_stmt end_sequence CHECK: .debug_pubnames contents: -CHECK-NEXT: length = 0x00000017 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000081 +CHECK-NEXT: length = 0x00000017 format = DWARF32 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000081 CHECK-NEXT: Offset Name CHECK-NEXT: 0x00000026 "main" -CHECK-NEXT: length = 0x00000036 version = 0x0002 unit_offset = 0x00000081 unit_size = 0x000000a5 +CHECK-NEXT: length = 0x00000036 format = DWARF32 version = 0x0002 unit_offset = 0x00000081 unit_size = 0x000000a5 CHECK-NEXT: Offset Name CHECK-NEXT: 0x0000002d "private_int" CHECK-NEXT: 0x00000042 "baz" CHECK-NEXT: 0x00000057 "foo" CHECK-NEXT: 0x00000086 "inc" -CHECK-NEXT: length = 0x00000026 version = 0x0002 unit_offset = 0x00000126 unit_size = 0x00000096 +CHECK-NEXT: length = 0x00000026 format = DWARF32 version = 0x0002 unit_offset = 0x00000126 unit_size = 0x00000096 CHECK-NEXT: Offset Name CHECK-NEXT: 0x00000026 "val" CHECK-NEXT: 0x00000048 "bar" CHECK-NEXT: 0x00000077 "inc" CHECK: .debug_pubtypes contents: -CHECK-NEXT: length = 0x0000001f version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000081 +CHECK-NEXT: length = 0x0000001f format = DWARF32 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000081 CHECK-NEXT: Offset Name CHECK-NEXT: 0x00000063 "int" CHECK-NEXT: 0x00000079 "char" -CHECK-NEXT: length = 0x00000016 version = 0x0002 unit_offset = 0x00000081 unit_size = 0x000000a5 +CHECK-NEXT: length = 0x00000016 format = DWARF32 version = 0x0002 unit_offset = 0x00000081 unit_size = 0x000000a5 CHECK-NEXT: Offset Name CHECK-NEXT: 0x00000026 "int" -CHECK-NEXT: length = 0x00000016 version = 0x0002 unit_offset = 0x00000126 unit_size = 0x00000096 +CHECK-NEXT: length = 0x00000016 format = DWARF32 version = 0x0002 unit_offset = 0x00000126 unit_size = 0x00000096 CHECK-NEXT: Offset Name CHECK-NEXT: 0x00000041 "int" Index: llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test =================================================================== --- llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test +++ llvm/test/tools/dsymutil/X86/basic-lto-dw4-linking-x86.test @@ -130,11 +130,11 @@ CHECK: .debug_aranges contents: -CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00 +CHECK-NEXT: Address Range Header: length = 0x0000002c, format = DWARF32, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00 CHECK-NEXT: [0x0000000100000f40, 0x0000000100000f4b) -CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x00000077, addr_size = 0x08, seg_size = 0x00 +CHECK-NEXT: Address Range Header: length = 0x0000002c, format = DWARF32, version = 0x0002, cu_offset = 0x00000077, addr_size = 0x08, seg_size = 0x00 CHECK-NEXT: [0x0000000100000f50, 0x0000000100000f87) -CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x0000011b, addr_size = 0x08, seg_size = 0x00 +CHECK-NEXT: Address Range Header: length = 0x0000002c, format = DWARF32, version = 0x0002, cu_offset = 0x0000011b, addr_size = 0x08, seg_size = 0x00 CHECK-NEXT: [0x0000000100000f90, 0x0000000100000fb4) CHECK: .debug_line contents: @@ -180,23 +180,23 @@ CHECK-NEXT: 0x0000000100000fb4 20 1 1 0 0 is_stmt end_sequence CHECK: .debug_pubnames contents: -CHECK-NEXT: length = 0x00000017 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000077 +CHECK-NEXT: length = 0x00000017 format = DWARF32 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000077 CHECK-NEXT: Offset Name CHECK-NEXT: 0x0000002a "main" -CHECK-NEXT: length = 0x0000002e version = 0x0002 unit_offset = 0x00000077 unit_size = 0x000000a4 +CHECK-NEXT: length = 0x0000002e format = DWARF32 version = 0x0002 unit_offset = 0x00000077 unit_size = 0x000000a4 CHECK-NEXT: Offset Name CHECK-NEXT: 0x00000031 "baz" CHECK-NEXT: 0x00000046 "private_int" CHECK-NEXT: 0x00000067 "foo" -CHECK-NEXT: length = 0x0000001e version = 0x0002 unit_offset = 0x0000011b unit_size = 0x00000085 +CHECK-NEXT: length = 0x0000001e format = DWARF32 version = 0x0002 unit_offset = 0x0000011b unit_size = 0x00000085 CHECK-NEXT: Offset Name CHECK-NEXT: 0x0000002a "val" CHECK-NEXT: 0x00000050 "bar" CHECK: .debug_pubtypes contents: -CHECK-NEXT: length = 0x00000017 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000077 +CHECK-NEXT: length = 0x00000017 format = DWARF32 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000077 CHECK-NEXT: Offset Name CHECK-NEXT: 0x0000006f "char" -CHECK-NEXT: length = 0x00000016 version = 0x0002 unit_offset = 0x00000077 unit_size = 0x000000a4 +CHECK-NEXT: length = 0x00000016 format = DWARF32 version = 0x0002 unit_offset = 0x00000077 unit_size = 0x000000a4 CHECK-NEXT: Offset Name CHECK-NEXT: 0x0000002a "int" Index: llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test =================================================================== --- llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test +++ llvm/test/tools/dsymutil/X86/basic-lto-linking-x86.test @@ -141,11 +141,11 @@ CHECK-NEXT: (0x0000000000000019, 0x000000000000001d): DW_OP_reg5 RDI, DW_OP_piece 0x4 CHECK: .debug_aranges contents: -CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00 +CHECK-NEXT: Address Range Header: length = 0x0000002c, format = DWARF32, version = 0x0002, cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00 CHECK-NEXT: [0x0000000100000f40, 0x0000000100000f4b) -CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x00000081, addr_size = 0x08, seg_size = 0x00 +CHECK-NEXT: Address Range Header: length = 0x0000002c, format = DWARF32, version = 0x0002, cu_offset = 0x00000081, addr_size = 0x08, seg_size = 0x00 CHECK-NEXT: [0x0000000100000f50, 0x0000000100000f89) -CHECK-NEXT: Address Range Header: length = 0x0000002c, version = 0x0002, cu_offset = 0x0000013a, addr_size = 0x08, seg_size = 0x00 +CHECK-NEXT: Address Range Header: length = 0x0000002c, format = DWARF32, version = 0x0002, cu_offset = 0x0000013a, addr_size = 0x08, seg_size = 0x00 CHECK-NEXT: [0x0000000100000f90, 0x0000000100000fb4) @@ -179,21 +179,21 @@ CHECK: 0x0000000100000fb4 20 0 1 0 0 is_stmt end_sequence CHECK: .debug_pubnames contents: -CHECK-NEXT: length = 0x00000017 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000081 +CHECK-NEXT: length = 0x00000017 format = DWARF32 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000081 CHECK-NEXT: Offset Name CHECK-NEXT: 0x00000026 "main" -CHECK-NEXT: length = 0x0000002e version = 0x0002 unit_offset = 0x00000081 unit_size = 0x000000b9 +CHECK-NEXT: length = 0x0000002e format = DWARF32 version = 0x0002 unit_offset = 0x00000081 unit_size = 0x000000b9 CHECK-NEXT: Offset Name CHECK-NEXT: 0x00000026 "private_int" CHECK-NEXT: 0x0000003f "baz" CHECK-NEXT: 0x00000058 "foo" -CHECK-NEXT: length = 0x0000001e version = 0x0002 unit_offset = 0x0000013a unit_size = 0x000000ac +CHECK-NEXT: length = 0x0000001e format = DWARF32 version = 0x0002 unit_offset = 0x0000013a unit_size = 0x000000ac CHECK-NEXT: Offset Name CHECK-NEXT: 0x00000026 "val" CHECK-NEXT: 0x00000045 "bar" CHECK: .debug_pubtypes contents: -CHECK-NEXT: length = 0x0000001f version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000081 +CHECK-NEXT: length = 0x0000001f format = DWARF32 version = 0x0002 unit_offset = 0x00000000 unit_size = 0x00000081 CHECK-NEXT: Offset Name CHECK-NEXT: 0x00000063 "int" CHECK-NEXT: 0x00000079 "char" Index: llvm/test/tools/dsymutil/X86/empty-CU.test =================================================================== --- llvm/test/tools/dsymutil/X86/empty-CU.test +++ llvm/test/tools/dsymutil/X86/empty-CU.test @@ -1,6 +1,6 @@ RUN: dsymutil --update -f %p/../Inputs/empty-CU.o -o - | llvm-dwarfdump -v - -debug-info | FileCheck %s CHECK: .debug_info contents: -CHECK: 0x00000000: Compile Unit: length = 0x00000008 version = 0x0003 abbr_offset = 0x0000 addr_size = 0x04 (next unit at 0x0000000c) +CHECK: 0x00000000: Compile Unit: length = 0x00000008 format = DWARF32 version = 0x0003 abbr_offset = 0x0000 addr_size = 0x04 (next unit at 0x0000000c) CHECK: 0x0000000b: DW_TAG_compile_unit [1] Index: llvm/test/tools/dsymutil/X86/frame-2.test =================================================================== --- llvm/test/tools/dsymutil/X86/frame-2.test +++ llvm/test/tools/dsymutil/X86/frame-2.test @@ -27,6 +27,7 @@ # CHECK: .debug_frame contents: # CHECK: 00000000 {{[0-9a-f]*}} ffffffff CIE +# CHECK-NEXT: Format: DWARF32 # CHECK-NEXT: Version:{{.*}}1 # CHECK-NOT: FDE # CHECK: FDE cie=00000000 pc=00001000...00001 @@ -34,11 +35,13 @@ # CHECK: FDE cie=00000000 pc=00002000...00002 # CHECK-NOT: FDE # CHECK: [[CIEDW4:[0-9a-f]*]] 00000010 ffffffff CIE +# CHECK-NEXT: Format: DWARF32 # CHECK-NEXT: Version:{{.*}}4 # CHECK-NOT: FDE # CHECK: FDE cie=[[CIEDW4]] pc=00003000...00003 # CHECK-NOT: FDE # CHECK: [[CIEDW2:[0-9a-f]*]] {{[0-9a-f]*}} ffffffff CIE +# CHECK-NEXT: Format: DWARF32 # CHECK-NEXT: Version:{{.*}}1 # CHECK-NOT: FDE # CHECK: FDE cie=[[CIEDW2]] pc=00004000...00004 Index: llvm/test/tools/dsymutil/X86/generate-empty-CU.test =================================================================== --- llvm/test/tools/dsymutil/X86/generate-empty-CU.test +++ llvm/test/tools/dsymutil/X86/generate-empty-CU.test @@ -15,14 +15,14 @@ ... .debug_info contents: -CHECK: Compile Unit: length = 0x0000007d version = 0x0002 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000081) +CHECK: Compile Unit: length = 0x0000007d format = DWARF32 version = 0x0002 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000081) CHECK: DW_TAG_compile_unit CHECK: DW_AT_name {{.*}} "basic1.c" CHECK: DW_TAG_subprogram DW_AT_name {{.*}} "main" -CHECK: 0x00000081: Compile Unit: length = 0x00000089 version = 0x0002 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x0000010e) +CHECK: 0x00000081: Compile Unit: length = 0x00000089 format = DWARF32 version = 0x0002 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x0000010e) CHECK: DW_TAG_compile_unit CHECK: DW_AT_name {{.*}} "basic3.c" Index: llvm/test/tools/llvm-dwarfdump/X86/debug-line.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug-line.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug-line.s @@ -8,6 +8,7 @@ # CHECK-NEXT: debug_line[0x00000000] # CHECK-NEXT: Line table prologue: # CHECK-NEXT: total_length: 0x00000069 +# CHECK-NEXT: format: DWARF32 # CHECK-NEXT: version: 5 # CHECK-NEXT: address_size: 8 # CHECK-NEXT: seg_select_size: 0 @@ -47,6 +48,7 @@ # CHECK-NEXT: debug_line[0x0000006d] # CHECK-NEXT: Line table prologue: # CHECK-NEXT: total_length: 0x0000001b +# CHECK-NEXT: format: DWARF32 # CHECK-NEXT: version: 4 # CHECK-NEXT: prologue_length: 0x00000015 # CHECK-NEXT: min_inst_length: 2 Index: llvm/test/tools/llvm-dwarfdump/X86/debug_addr.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_addr.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug_addr.s @@ -3,12 +3,12 @@ # CHECK: .debug_addr contents -# CHECK-NEXT: length = 0x0000000c, version = 0x0005, addr_size = 0x04, seg_size = 0x00 +# CHECK-NEXT: length = 0x0000000c, format = DWARF32, version = 0x0005, addr_size = 0x04, seg_size = 0x00 # CHECK-NEXT: Addrs: [ # CHECK-NEXT: 0x00000000 # CHECK-NEXT: 0x00000001 # CHECK-NEXT: ] -# CHECK-NEXT: length = 0x00000004, version = 0x0005, addr_size = 0x04, seg_size = 0x00 +# CHECK-NEXT: length = 0x00000004, format = DWARF32, version = 0x0005, addr_size = 0x04, seg_size = 0x00 # CHECK-NOT: {{.}} .section .debug_abbrev,"",@progbits Index: llvm/test/tools/llvm-dwarfdump/X86/debug_addr_64bit_address.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_addr_64bit_address.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug_addr_64bit_address.s @@ -2,7 +2,7 @@ # RUN: llvm-dwarfdump -debug-addr %t.o | FileCheck %s # CHECK: .debug_addr contents -# CHECK-NEXT: length = 0x00000014, version = 0x0005, addr_size = 0x08, seg_size = 0x00 +# CHECK-NEXT: length = 0x00000014, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00 # CHECK-NEXT: Addrs: [ # CHECK-NEXT: 0x0000000100000000 # CHECK-NEXT: 0x0000000100000001 Index: llvm/test/tools/llvm-dwarfdump/X86/debug_addr_address_size_mismatch.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_addr_address_size_mismatch.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug_addr_address_size_mismatch.s @@ -6,11 +6,11 @@ # WARN-NOT: {{.}} # CHECK: .debug_addr contents -# CHECK-NEXT: length = 0x0000000c, version = 0x0005, addr_size = 0x08, seg_size = 0x00 +# CHECK-NEXT: length = 0x0000000c, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00 # CHECK-NEXT: Addrs: [ # CHECK-NEXT: 0x0000000100000000 # CHECK-NEXT: ] -# CHECK-NEXT: length = 0x0000000c, version = 0x0005, addr_size = 0x04, seg_size = 0x00 +# CHECK-NEXT: length = 0x0000000c, format = DWARF32, version = 0x0005, addr_size = 0x04, seg_size = 0x00 # CHECK-NEXT: Addrs: [ # CHECK-NEXT: 0x00000000 # CHECK-NEXT: 0x00000001 Index: llvm/test/tools/llvm-dwarfdump/X86/debug_addr_dwarf64.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_addr_dwarf64.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug_addr_dwarf64.s @@ -5,6 +5,7 @@ # CHECK: .debug_addr contents: # CHECK-NEXT: Address table header: # CHECK-SAME: length = 0x000000000000000c, +# CHECK-SAME: format = DWARF64, # CHECK-SAME: version = 0x0005, # CHECK-SAME: addr_size = 0x04, # CHECK-SAME: seg_size = 0x00 Index: llvm/test/tools/llvm-dwarfdump/X86/debug_addr_rela.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_addr_rela.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug_addr_rela.s @@ -8,7 +8,7 @@ ## a RELA relocation to recover the real value. # CHECK: .debug_addr contents -# CHECK-NEXT: length = 0x0000000c, version = 0x0005, addr_size = 0x08, seg_size = 0x00 +# CHECK-NEXT: length = 0x0000000c, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00 # CHECK-NEXT: Addrs: [ # CHECK-NEXT: 0x000000000000002a # CHECK-NEXT: ] Index: llvm/test/tools/llvm-dwarfdump/X86/debug_addr_unsupported_version.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_addr_unsupported_version.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug_addr_unsupported_version.s @@ -7,7 +7,7 @@ # ERR-NOT: {{.}} # CHECK: .debug_addr contents -# CHECK-NEXT: length = 0x0000000c, version = 0x0005, addr_size = 0x04, seg_size = 0x00 +# CHECK-NEXT: length = 0x0000000c, format = DWARF32, version = 0x0005, addr_size = 0x04, seg_size = 0x00 # CHECK-NEXT: Addrs: [ # CHECK-NEXT: 0x00000002 # CHECK-NEXT: 0x00000003 Index: llvm/test/tools/llvm-dwarfdump/X86/debug_frame_GNU_args_size.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_frame_GNU_args_size.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug_frame_GNU_args_size.s @@ -3,6 +3,7 @@ # CHECK: .eh_frame contents: # CHECK: 00000018 00000010 0000001c FDE cie=00000000 pc=00000000...00000000 +# CHECK-NEXT: Format: DWARF32 # CHECK-NEXT: DW_CFA_GNU_args_size: +16 # CHECK-NEXT: DW_CFA_nop: Index: llvm/test/tools/llvm-dwarfdump/X86/debug_frame_offset.test =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_frame_offset.test +++ llvm/test/tools/llvm-dwarfdump/X86/debug_frame_offset.test @@ -2,6 +2,7 @@ RUN: | llvm-dwarfdump -debug-frame=0x00000014 - | FileCheck %s CHECK: .debug_frame contents: CHECK-NEXT: 00000014 00000014 00000000 FDE cie=00000000 pc=00000000...0000001d +CHECK-NEXT: Format: DWARF32 CHECK-NEXT: DW_CFA_advance_loc: 1 CHECK-NOT: pc @@ -9,6 +10,7 @@ RUN: -eh-frame=0x00000018 | FileCheck %s --check-prefix=EH EH: .eh_frame contents: EH-NEXT: 00000018 00000024 0000001c FDE cie=00000000 pc=fffffffffffffd00...fffffffffffffd24 +EH-NEXT: Format: DWARF32 EH-NEXT: DW_CFA_advance_loc: 1 EH-NOT: pc EH-NOT: CIE Index: llvm/test/tools/llvm-dwarfdump/X86/debug_info_min_dwarf64.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_info_min_dwarf64.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug_info_min_dwarf64.s @@ -19,6 +19,7 @@ .long 0xffffffff # DWARF64 mark .quad DI_4_64_end - DI_4_64_version # Length of Unit # CHECK-SAME: length = 0x000000000000000f +# CHECK-SAME: format = DWARF64 DI_4_64_version: .short 4 # DWARF version number # CHECK-SAME: version = 0x0004 Index: llvm/test/tools/llvm-dwarfdump/X86/debug_line_dwarf64_large_table.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_line_dwarf64_large_table.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug_line_dwarf64_large_table.s @@ -9,6 +9,7 @@ # CHECK-NEXT: warning: line table program with offset 0x00000000 has length 0xfffffffc but only 0x0000003a bytes are available # CHECK-NEXT: Line table prologue: # CHECK-NEXT: total_length: 0x00000000fffffff0 +# CHECK-NEXT: format: DWARF64 # CHECK-NEXT: version: 4 # CHECK-NEXT: prologue_length: 0x0000000000000016 Index: llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test +++ llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test @@ -56,6 +56,7 @@ # NONFATAL: debug_line[0x00000048] # NONFATAL-NEXT: Line table prologue # NONFATAL-NEXT: total_length: 0x00000002 +# NONFATAL-NEXT: format: DWARF32 # NONFATAL-NEXT: version: 0 # NONFATAL-NOT: prologue_length @@ -63,6 +64,7 @@ # NONFATAL: debug_line[0x0000004e] # NONFATAL-NEXT: Line table prologue # NONFATAL-NEXT: total_length: 0x00000002 +# NONFATAL-NEXT: format: DWARF32 # NONFATAL-NEXT: version: 1 # NONFATAL-NOT: prologue_length Index: llvm/test/tools/llvm-dwarfdump/X86/debug_loclists.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_loclists.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug_loclists.s @@ -32,7 +32,7 @@ # BOTH-NEXT: DW_LLE_startx_length (0x000000000000dead, 0x0000000000000001): DW_OP_reg4 RSI) -# BOTH: locations list header: length = 0x00000056, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# BOTH: locations list header: length = 0x00000056, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # BOTH-NEXT: 0x0000000c: # BOTH-NEXT: DW_LLE_startx_endx (0x0000000000000000, 0x0000000000000001): DW_OP_reg0 RAX # BOTH-NEXT: DW_LLE_startx_length (0x0000000000000001, 0x0000000000000001): DW_OP_reg1 RDX Index: llvm/test/tools/llvm-dwarfdump/X86/debug_loclists_nouse.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_loclists_nouse.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug_loclists_nouse.s @@ -1,7 +1,7 @@ # RUN: llvm-mc %s -filetype obj -triple x86_64-pc-linux -o %t.o # RUN: llvm-dwarfdump %t.o | FileCheck %s -# CHECK: 0x00000000: Compile Unit: length = 0x00000009 version = 0x0005 unit_type = DW_UT_compile abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x0000000d) +# CHECK: 0x00000000: Compile Unit: length = 0x00000009 format = DWARF32 version = 0x0005 unit_type = DW_UT_compile abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x0000000d) # CHECK: 0x0000000c: DW_TAG_compile_unit .section .debug_abbrev,"",@progbits Index: llvm/test/tools/llvm-dwarfdump/X86/debug_loclists_startx_length.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_loclists_startx_length.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug_loclists_startx_length.s @@ -6,7 +6,7 @@ # the final version which uses ULEB128 and not the U32. # CHECK: .debug_loclists contents: -# CHECK-NEXT: 0x00000000: locations list header: length = 0x0000000e, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# CHECK-NEXT: 0x00000000: locations list header: length = 0x0000000e, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # CHECK-NEXT: 0x0000000c: # CHECK-NEXT: DW_LLE_startx_length (0x0000000000000001, 0x0000000000000010): DW_OP_reg5 RDI # CHECK-NEXT: DW_LLE_end_of_list () Index: llvm/test/tools/llvm-dwarfdump/X86/debug_rnglists.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_rnglists.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug_rnglists.s @@ -5,10 +5,10 @@ # RUN: FileCheck %s --input-file %t.err --check-prefix=ERR # BOTH: .debug_rnglists contents: -# TERSE-NEXT: range list header: length = 0x00000037, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# TERSE-NEXT: range list header: length = 0x00000037, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # VERBOSE-NEXT: 0x{{[0-9a-f]*}}: -# VERBOSE-SAME: range list header: length = 0x00000037, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# VERBOSE-SAME: range list header: length = 0x00000037, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # BOTH-NEXT: ranges: # TERSE-NEXT: [0x0000000000000010, 0x0000000000000020) @@ -24,10 +24,10 @@ # VERBOSE-NEXT: 0x00000029: [DW_RLE_start_end ]: [0x0000000000000100, 0x0000000000000200) # VERBOSE-NEXT: 0x0000003a: [DW_RLE_end_of_list ] -# TERSE-NEXT: range list header: length = 0x0000002b, version = 0x0005, addr_size = 0x04, seg_size = 0x00, offset_entry_count = 0x00000002 +# TERSE-NEXT: range list header: length = 0x0000002b, format = DWARF32, version = 0x0005, addr_size = 0x04, seg_size = 0x00, offset_entry_count = 0x00000002 # VERBOSE-NEXT: 0x{{[0-9a-f]*}}: -# VERBOSE-SAME: range list header: length = 0x0000002b, version = 0x0005, addr_size = 0x04, seg_size = 0x00, offset_entry_count = 0x00000002 +# VERBOSE-SAME: range list header: length = 0x0000002b, format = DWARF32, version = 0x0005, addr_size = 0x04, seg_size = 0x00, offset_entry_count = 0x00000002 # BOTH-NEXT: offsets: [ # BOTH-NEXT: 0x00000008 @@ -49,19 +49,19 @@ # VERBOSE-NEXT: 0x00000062: [DW_RLE_start_length]: 0x00000036, 0x00000100 => [0x00000036, 0x00000136) # VERBOSE-NEXT: 0x00000069: [DW_RLE_end_of_list ] -# TERSE-NEXT: range list header: length = 0x00000008, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# TERSE-NEXT: range list header: length = 0x00000008, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # VERBOSE-NEXT: 0x{{[0-9a-f]*}}: -# VERBOSE-SAME: range list header: length = 0x00000008, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# VERBOSE-SAME: range list header: length = 0x00000008, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # BOTH-NOT: offsets: # BOTH: ranges: # BOTH-NOT: [ -# TERSE-NEXT: range list header: length = 0x0000000b, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# TERSE-NEXT: range list header: length = 0x0000000b, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # VERBOSE-NEXT: 0x{{[0-9a-f]*}}: -# VERBOSE-SAME: range list header: length = 0x0000000b, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# VERBOSE-SAME: range list header: length = 0x0000000b, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # BOTH-NEXT: ranges: # TERSE-NEXT: @@ -69,10 +69,10 @@ # VERBOSE-NEXT: 0x00000082: [DW_RLE_base_addressx]: 0x0000000000000000 # VERBOSE-NEXT: 0x00000084: [DW_RLE_end_of_list ] -# TERSE-NEXT: range list header: length = 0x0000000c, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# TERSE-NEXT: range list header: length = 0x0000000c, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # VERBOSE-NEXT: 0x{{[0-9a-f]*}}: -# VERBOSE-SAME: range list header: length = 0x0000000c, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# VERBOSE-SAME: range list header: length = 0x0000000c, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # BOTH-NEXT: ranges: # TERSE-NEXT: [0x0000000000000000, 0x000000000000002a) @@ -81,10 +81,10 @@ # VERBOSE-NEXT: 0x000000a1: [DW_RLE_startx_length]: 0x0000000000000002, 0x000000000000002a => [0x0000000000000000, 0x000000000000002a) # VERBOSE-NEXT: 0x000000a4: [DW_RLE_end_of_list ] -# TERSE-NEXT: range list header: length = 0x0000000e, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# TERSE-NEXT: range list header: length = 0x0000000e, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # VERBOSE-NEXT: 0x{{[0-9a-f]*}}: -# VERBOSE-SAME: range list header: length = 0x0000000e, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# VERBOSE-SAME: range list header: length = 0x0000000e, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # BOTH-NEXT: ranges: # TERSE-NEXT: [0x0000000000000800, 0x0000000000001000) @@ -94,10 +94,10 @@ # VERBOSE-SAME: [0x0000000000000800, 0x0000000000001000) # VERBOSE-NEXT: 0x000000b6: [DW_RLE_end_of_list] -# TERSE-NEXT: range list header: length = 0x00000017, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# TERSE-NEXT: range list header: length = 0x00000017, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # VERBOSE-NEXT: 0x{{[0-9a-f]*}}: -# VERBOSE-SAME: range list header: length = 0x00000017, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# VERBOSE-SAME: range list header: length = 0x00000017, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # BOTH-NEXT: ranges: # TERSE-NEXT: [0x0000000000001800, 0x0000000000002000) Index: llvm/test/tools/llvm-dwarfdump/X86/debug_rnglists_dwarf64.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_rnglists_dwarf64.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug_rnglists_dwarf64.s @@ -5,6 +5,7 @@ # CHECK: .debug_rnglists contents: # CHECK-NEXT: 0x00000000: range list header: # CHECK-SAME: length = 0x000000000000001a, +# CHECK-SAME: format = DWARF64, # CHECK-SAME: version = 0x0005, # CHECK-SAME: addr_size = 0x08, # CHECK-SAME: seg_size = 0x00, Index: llvm/test/tools/llvm-dwarfdump/X86/debug_rnglists_invalid.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/debug_rnglists_invalid.s +++ llvm/test/tools/llvm-dwarfdump/X86/debug_rnglists_invalid.s @@ -11,14 +11,14 @@ # RUN: FileCheck %s --input-file %t.err # GOOD: .debug_rnglists contents: -# GOOD-NEXT: range list header: length = 0x0000001e, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000001 +# GOOD-NEXT: range list header: length = 0x0000001e, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000001 # GOOD-NEXT: offsets: [ # GOOD-NEXT: 0x00000004 # GOOD-NEXT: ] # GOOD-NEXT: ranges: # GOOD-NEXT: [0x0000000000000010, 0x0000000000000020) # GOOD-NEXT: -# GOOD-NEXT: range list header: length = 0x0000001a, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 +# GOOD-NEXT: range list header: length = 0x0000001a, format = DWARF32, version = 0x0005, addr_size = 0x08, seg_size = 0x00, offset_entry_count = 0x00000000 # GOOD-NEXT: ranges: # GOOD-NEXT: [0x0000000000000030, 0x0000000000000040) # GOOD-NEXT: Index: llvm/test/tools/llvm-dwarfdump/X86/eh-frame-return-address-reg.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/eh-frame-return-address-reg.s +++ llvm/test/tools/llvm-dwarfdump/X86/eh-frame-return-address-reg.s @@ -11,6 +11,7 @@ # CHECK: .eh_frame contents: # CHECK: 00000000 00000010 00000000 CIE +# CHECK-NEXT: Format: DWARF32 # CHECK-NEXT: Version: 1 # CHECK-NEXT: Augmentation: "zR" # CHECK-NEXT: Code alignment factor: 1 Index: llvm/test/tools/llvm-dwarfdump/X86/lookup.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/lookup.s +++ llvm/test/tools/llvm-dwarfdump/X86/lookup.s @@ -20,7 +20,7 @@ # RUN: | llvm-dwarfdump -lookup=0x14 - | \ # RUN: FileCheck %s -check-prefixes=CHECK,C -# CHECK: Compile Unit: length = 0x00000060 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000064) +# CHECK: Compile Unit: length = 0x00000060 format = DWARF32 version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000064) # CHECK: DW_TAG_compile_unit # CHECK: DW_AT_name ("foo.c") Index: llvm/test/tools/llvm-dwarfdump/X86/typeunit-v4-dwarf64.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/typeunit-v4-dwarf64.s +++ llvm/test/tools/llvm-dwarfdump/X86/typeunit-v4-dwarf64.s @@ -26,6 +26,7 @@ .long 0xffffffff # DWARF64 mark .quad TU_4_64_end-TU_4_64_version # Length of Unit # CHECK-SAME: length = 0x0000000000000021 +# CHECK-SAME: format = DWARF64 TU_4_64_version: .short 4 # DWARF version number # CHECK-SAME: version = 0x0004 Index: llvm/test/tools/llvm-dwarfdump/X86/typeunit-v5-dwarf64.s =================================================================== --- llvm/test/tools/llvm-dwarfdump/X86/typeunit-v5-dwarf64.s +++ llvm/test/tools/llvm-dwarfdump/X86/typeunit-v5-dwarf64.s @@ -26,6 +26,7 @@ .long 0xffffffff # DWARF64 mark .quad TU_5_64_end-TU_5_64_version # Length of Unit # CHECK-SAME: length = 0x0000000000000022 +# CHECK-SAME: format = DWARF64 TU_5_64_version: .short 5 # DWARF version number # CHECK-SAME: version = 0x0005 Index: llvm/test/tools/llvm-dwp/X86/info-v5.s =================================================================== --- llvm/test/tools/llvm-dwp/X86/info-v5.s +++ llvm/test/tools/llvm-dwp/X86/info-v5.s @@ -6,7 +6,7 @@ # RUN: llvm-dwarfdump -v %t.dwp | FileCheck %s #CHECK-DAG: .debug_info.dwo contents: -#CHECK: 0x00000000: Compile Unit: length = 0x00000050 version = 0x0005 unit_type = DW_UT_split_compile abbr_offset = 0x0000 addr_size = 0x08 DWO_id = [[DWOID:.*]] (next unit at 0x00000054) +#CHECK: 0x00000000: Compile Unit: length = 0x00000050 format = DWARF32 version = 0x0005 unit_type = DW_UT_split_compile abbr_offset = 0x0000 addr_size = 0x08 DWO_id = [[DWOID:.*]] (next unit at 0x00000054) # CHECK-DAG: .debug_cu_index contents: # CHECK: version = 2 slots = 2 Index: llvm/test/tools/llvm-dwp/X86/simple.test =================================================================== --- llvm/test/tools/llvm-dwp/X86/simple.test +++ llvm/test/tools/llvm-dwp/X86/simple.test @@ -55,13 +55,13 @@ NOTYP-NOT: .debug_types.dwo contents: TYPES-LABEL: .debug_types.dwo contents: TYPES: [[FOOUOFF:0x[0-9a-f]*]]: -TYPES-LABEL: Type Unit: length = 0x00000020 version = 0x0004 abbr_offset = +TYPES-LABEL: Type Unit: length = 0x00000020 format = DWARF32 version = 0x0004 abbr_offset = TYPES: 0x[[AAOFF]] addr_size = 0x08 name = 'foo' type_signature = [[FOOSIG]] type_offset = 0x[[FOOOFF:.*]] (next unit at [[BARUOFF:.*]]) TYPES: DW_TAG_type_unit TYPES: [[FOOOFF]]: DW_TAG_structure_type TYPES: DW_AT_name {{.*}} "foo" TYPES: [[BARUOFF]]: -TYPES-LABEL: Type Unit: length = 0x00000020 version = 0x0004 abbr_offset = +TYPES-LABEL: Type Unit: length = 0x00000020 format = DWARF32 version = 0x0004 abbr_offset = TYPES: 0x[[BAOFF]] addr_size = 0x08 name = 'bar' type_signature = [[BARSIG]] type_offset = 0x001e (next unit at [[XUOFF:.*]]) TYPES: DW_TAG_type_unit TYPES: 0x00000042: DW_TAG_structure_type Index: llvm/test/tools/llvm-dwp/X86/type_dedup.test =================================================================== --- llvm/test/tools/llvm-dwp/X86/type_dedup.test +++ llvm/test/tools/llvm-dwp/X86/type_dedup.test @@ -18,19 +18,19 @@ CHECK-LABEL: .debug_types.dwo contents: CHECK: [[COMMONUOFF:0x[0-9a-f]*]]: -CHECK-LABEL: Type Unit: length = 0x00000020 version = 0x0004 abbr_offset = +CHECK-LABEL: Type Unit: length = 0x00000020 format = DWARF32 version = 0x0004 abbr_offset = CHECK: 0x0000 addr_size = 0x08 name = 'common' type_signature = [[COMMONSIG:0x[0-9a-f]*]] type_offset = 0x[[COMMONOFF:.*]] (next unit at [[AUOFF:.*]]) CHECK: DW_TAG_type_unit CHECK: [[COMMONOFF]]: DW_TAG_structure_type CHECK: DW_AT_name {{.*}} "common" CHECK: [[AUOFF]]: -CHECK-LABEL: Type Unit: length = 0x00000020 version = 0x0004 abbr_offset = +CHECK-LABEL: Type Unit: length = 0x00000020 format = DWARF32 version = 0x0004 abbr_offset = CHECK: 0x0000 addr_size = 0x08 name = 'adistinct' type_signature = [[ASIG:0x[0-9a-f]*]] type_offset = 0x[[AOFF:.*]] (next unit at [[BUOFF:.*]]) CHECK: DW_TAG_type_unit CHECK: 0x00000042: DW_TAG_structure_type CHECK: DW_AT_name {{.*}} "adistinct" CHECK: [[BUOFF]]: -CHECK-LABEL: Type Unit: length = 0x00000020 version = 0x0004 abbr_offset = +CHECK-LABEL: Type Unit: length = 0x00000020 format = DWARF32 version = 0x0004 abbr_offset = CHECK: 0x{{.*}} addr_size = 0x08 name = 'bdistinct' type_signature = [[BSIG:0x[0-9a-f]*]] type_offset = 0x[[BOFF:.*]] (next unit at [[XUOFF:.*]]) CHECK: DW_TAG_type_unit CHECK: 0x00000066: DW_TAG_structure_type