1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

[DebugInfo] Report the format of location and range lists [9/10]

Differential Revision: https://reviews.llvm.org/D80523
This commit is contained in:
Igor Kudrin 2020-06-02 16:11:02 +07:00
parent ba6b0a8894
commit 3b29ebc42a
14 changed files with 33 additions and 28 deletions

View File

@ -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);

View File

@ -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

View File

@ -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,

View File

@ -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)

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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: ]

View File

@ -78,7 +78,7 @@ b:
// DWARF34-NEXT: 00000000 <End of list>
// 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)

View File

@ -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

View File

@ -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 ()

View File

@ -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: <End of list>
@ -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)

View File

@ -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,

View File

@ -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: <End of list>
# 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: <End of list>