xref: /llvm-project/llvm/test/tools/llvm-dwarfdump/X86/typeunit-v5-dwarf64.s (revision c3902b62e63752edd196648f797af5f97006ae1d)
1# RUN: llvm-mc %s -filetype obj -triple x86_64-unknown-elf -o - | \
2# RUN:   llvm-dwarfdump -debug-info - | \
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_info,"",@progbits
23# CHECK: .debug_info contents:
24# CHECK-NEXT: 0x00000000: Type Unit:
25TU_5_64_start:
26        .long 0xffffffff            # DWARF64 mark
27        .quad TU_5_64_end-TU_5_64_version  # Length of Unit
28# CHECK-SAME: length = 0x0000000000000022
29# CHECK-SAME: format = DWARF64
30TU_5_64_version:
31        .short 5                    # DWARF version number
32# CHECK-SAME: version = 0x0005
33        .byte 2                     # DW_UT_type
34        .byte 8                     # Address Size (in bytes)
35        .quad .debug_abbrev         # Offset Into Abbrev. Section
36# CHECK-SAME: abbr_offset = 0x0000
37# CHECK-SAME: addr_size = 0x08
38# CHECK-SAME: name = ''
39        .quad 0x0011223344556677    # Type Signature
40# CHECK-SAME: type_signature = 0x0011223344556677
41        .quad TU_5_64_type-TU_5_64_start # Type offset
42# CHECK-SAME: type_offset = 0x002a
43# CHECK-SAME: (next unit at 0x0000002e)
44
45        .byte 1                     # Abbreviation code
46# CHECK: 0x00000028: DW_TAG_type_unit
47        .byte 1                     # DW_VIS_local
48# CHECK-NEXT: DW_AT_visibility (DW_VIS_local)
49
50TU_5_64_type:
51        .byte 2                     # Abbreviation code
52# CHECK: 0x0000002a: DW_TAG_structure_type
53        .byte 1                     # DW_VIS_local
54# CHECK-NEXT: DW_AT_visibility (DW_VIS_local)
55
56        .byte 0 # NULL
57# CHECK: 0x0000002c: NULL
58        .byte 0 # NULL
59TU_5_64_end:
60