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());
.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
.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
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)
.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
.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
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
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