1 ## The test checks that we can read DWARFv5 type units in DWP files.
3 # RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o - | \
4 # RUN: llvm-dwarfdump -debug-info - | \
7 # CHECK: .debug_info.dwo contents:
9 # CHECK: DW_TAG_type_unit
10 # CHECK-NEXT: DW_AT_visibility (DW_VIS_local)
11 # CHECK: DW_TAG_structure_type
12 # CHECK-NEXT: DW_AT_name ("foo")
14 .section .debug_abbrev.dwo, "e", @progbits
15 ## Reserve some space in the section so that the abbreviation table for the type
16 ## unit does not start at the beginning of the section and thus the base offset
17 ## from the index section should be added to find the correct offset.
20 .uleb128 1 # Abbrev code
21 .uleb128 0x41 # DW_TAG_type_unit
22 .byte 1 # DW_CHILDREN_yes
23 .uleb128 0x17 # DW_AT_visibility
24 .uleb128 0x0b # DW_FORM_data1
27 .uleb128 2 # Abbrev code
28 .uleb128 0x13 # DW_TAG_structure_type
29 .byte 0 # DW_CHILDREN_no
30 .uleb128 0x03 # DW_AT_name
31 .uleb128 0x08 # DW_FORM_string
37 .section .debug_info.dwo, "e", @progbits
39 .long .LTUEnd-.LTUVersion # Length of Unit
41 .short 5 # DWARF version number
42 .byte 6 # DW_UT_split_type
43 .byte 8 # Address Size (in bytes)
44 .long 0 # Offset Into Abbrev. Section
45 .quad 0x1100001122222222 # Type Signature
46 .long .LTUType-.LTUBegin # Type offset
47 .uleb128 1 # Abbrev [1] DW_TAG_type_unit
48 .byte 1 # DW_AT_visibility
50 .uleb128 2 # Abbrev [2] DW_TAG_structure_type
51 .asciz "foo" # DW_AT_name
54 .section .debug_tu_index, "", @progbits
58 .long 2 # Section count
61 ## Hash Table of Signatures:
62 .quad 0x1100001122222222
64 ## Parallel Table of Indexes:
67 ## Table of Section Offsets:
69 .long 1 # DW_SECT_INFO
70 .long 3 # DW_SECT_ABBREV
72 .long 0 # Offset in .debug_info.dwo
73 .long .LAbbrevBegin-.debug_abbrev.dwo # Offset in .debug_abbrev.dwo
74 ## Table of Section Sizes:
75 .long .LTUEnd-.LTUBegin # Size in .debug_info.dwo
76 .long .LAbbrevEnd-.LAbbrevBegin # Size in .debug_abbrev.dwo