xref: /llvm-project/llvm/test/tools/llvm-dwarfdump/X86/typeunit-v4-dwarf64.s (revision c3902b62e63752edd196648f797af5f97006ae1d)
1# RUN: llvm-mc %s -filetype obj -triple x86_64-unknown-elf -o - | \
2# RUN:   llvm-dwarfdump -debug-types - | \
3# RUN:   FileCheck %s
4
5        .section .debug_abbrev,"",@progbits
6        .byte 0x01  # Abbrev code
7        .byte 0x41  # DW_TAG_type_unit
8        .byte 0x01  # DW_CHILDREN_yes
9        .byte 0x17  # DW_AT_visibility
10        .byte 0x0b  # DW_FORM_data1
11        .byte 0x00  # EOM(1)
12        .byte 0x00  # EOM(2)
13        .byte 0x02  # Abbrev code
14        .byte 0x13  # DW_TAG_structure_type
15        .byte 0x00  # DW_CHILDREN_no (no members)
16        .byte 0x17  # DW_AT_visibility
17        .byte 0x0b  # DW_FORM_data1
18        .byte 0x00  # EOM(1)
19        .byte 0x00  # EOM(2)
20        .byte 0x00  # EOM(3)
21
22        .section .debug_types,"",@progbits
23# CHECK: .debug_types contents:
24# CHECK-NEXT: 0x00000000: Type Unit:
25TU_4_64_start:
26        .long 0xffffffff            # DWARF64 mark
27        .quad TU_4_64_end-TU_4_64_version  # Length of Unit
28# CHECK-SAME: length = 0x0000000000000021
29# CHECK-SAME: format = DWARF64
30TU_4_64_version:
31        .short 4                    # DWARF version number
32# CHECK-SAME: version = 0x0004
33        .quad .debug_abbrev         # Offset Into Abbrev. Section
34# CHECK-SAME: abbr_offset = 0x0000
35        .byte 8                     # Address Size (in bytes)
36# CHECK-SAME: addr_size = 0x08
37# CHECK-SAME: name = ''
38        .quad 0x0011223344556677    # Type Signature
39# CHECK-SAME: type_signature = 0x0011223344556677
40        .quad TU_4_64_type-TU_4_64_start # Type offset
41# CHECK-SAME: type_offset = 0x0029
42# CHECK-SAME: (next unit at 0x0000002d)
43
44        .byte 1                     # Abbreviation code
45# CHECK: 0x00000027: DW_TAG_type_unit
46        .byte 1                     # DW_VIS_local
47# CHECK-NEXT: DW_AT_visibility (DW_VIS_local)
48
49TU_4_64_type:
50        .byte 2                     # Abbreviation code
51# CHECK: 0x00000029: DW_TAG_structure_type
52        .byte 1                     # DW_VIS_local
53# CHECK-NEXT: DW_AT_visibility (DW_VIS_local)
54
55        .byte 0 # NULL
56# CHECK: 0x0000002b: NULL
57        .byte 0 # NULL
58TU_4_64_end:
59