diff --git a/lib/DebugInfo/DWARF/DWARFListTable.cpp b/lib/DebugInfo/DWARF/DWARFListTable.cpp index a380434b4d3..5f5f12a3908 100644 --- a/lib/DebugInfo/DWARF/DWARFListTable.cpp +++ b/lib/DebugInfo/DWARF/DWARFListTable.cpp @@ -80,11 +80,12 @@ void DWARFListTableHeader::dump(raw_ostream &OS, DIDumpOptions DumpOpts) const { 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); diff --git a/test/CodeGen/X86/debug-loclists.ll b/test/CodeGen/X86/debug-loclists.ll index 10cd877bf1c..59f244e6266 100644 --- a/test/CodeGen/X86/debug-loclists.ll +++ b/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 diff --git a/test/DebugInfo/X86/dwarfdump-debug-loclists-dwarf64.s b/test/DebugInfo/X86/dwarfdump-debug-loclists-dwarf64.s index bc0a233ec1a..4408060d289 100644 --- a/test/DebugInfo/X86/dwarfdump-debug-loclists-dwarf64.s +++ b/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, diff --git a/test/DebugInfo/X86/dwarfdump-debug-loclists.test b/test/DebugInfo/X86/dwarfdump-debug-loclists.test index 5b6b6b8d5cc..30f628eb991 100644 --- a/test/DebugInfo/X86/dwarfdump-debug-loclists.test +++ b/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) diff --git a/test/DebugInfo/X86/dwarfdump-rnglists-dwarf64.s b/test/DebugInfo/X86/dwarfdump-rnglists-dwarf64.s index 7bf55548179..f6c8751083f 100644 --- a/test/DebugInfo/X86/dwarfdump-rnglists-dwarf64.s +++ b/test/DebugInfo/X86/dwarfdump-rnglists-dwarf64.s @@ -216,6 +216,7 @@ Range1_end: # 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 @@ Range1_end: # 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, diff --git a/test/DebugInfo/X86/fission-ranges.ll b/test/DebugInfo/X86/fission-ranges.ll index 9584d5c197d..e8d8bd86f2f 100644 --- a/test/DebugInfo/X86/fission-ranges.ll +++ b/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 diff --git a/test/DebugInfo/X86/rnglists_curanges.ll b/test/DebugInfo/X86/rnglists_curanges.ll index 05206a7b5b2..34a6c5057cf 100644 --- a/test/DebugInfo/X86/rnglists_curanges.ll +++ b/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 diff --git a/test/DebugInfo/X86/split-dwarf-v5-ranges.ll b/test/DebugInfo/X86/split-dwarf-v5-ranges.ll index 1761c4aa8fe..183787620b7 100644 --- a/test/DebugInfo/X86/split-dwarf-v5-ranges.ll +++ b/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: ] diff --git a/test/MC/ARM/dwarf-asm-multiple-sections.s b/test/MC/ARM/dwarf-asm-multiple-sections.s index f3daa02a562..8147fbb8c91 100644 --- a/test/MC/ARM/dwarf-asm-multiple-sections.s +++ b/test/MC/ARM/dwarf-asm-multiple-sections.s @@ -78,7 +78,7 @@ b: // 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) diff --git a/test/tools/llvm-dwarfdump/X86/debug_loclists.s b/test/tools/llvm-dwarfdump/X86/debug_loclists.s index f84e3116c81..925957b84c2 100644 --- a/test/tools/llvm-dwarfdump/X86/debug_loclists.s +++ b/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 diff --git a/test/tools/llvm-dwarfdump/X86/debug_loclists_startx_length.s b/test/tools/llvm-dwarfdump/X86/debug_loclists_startx_length.s index 4203c382ee7..55fe7128911 100644 --- a/test/tools/llvm-dwarfdump/X86/debug_loclists_startx_length.s +++ b/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 () diff --git a/test/tools/llvm-dwarfdump/X86/debug_rnglists.s b/test/tools/llvm-dwarfdump/X86/debug_rnglists.s index 650fc1aafbd..c9c94637b4d 100644 --- a/test/tools/llvm-dwarfdump/X86/debug_rnglists.s +++ b/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) diff --git a/test/tools/llvm-dwarfdump/X86/debug_rnglists_dwarf64.s b/test/tools/llvm-dwarfdump/X86/debug_rnglists_dwarf64.s index 59560ff1c46..7582ec7d1e6 100644 --- a/test/tools/llvm-dwarfdump/X86/debug_rnglists_dwarf64.s +++ b/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, diff --git a/test/tools/llvm-dwarfdump/X86/debug_rnglists_invalid.s b/test/tools/llvm-dwarfdump/X86/debug_rnglists_invalid.s index 64060471f05..d176363bebb 100644 --- a/test/tools/llvm-dwarfdump/X86/debug_rnglists_invalid.s +++ b/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: