Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / llvm-dwarfdump / X86 / verify_split_cu.s
blob3941d9f1a7a57fcfe5d591eb7a5aca8c8648a759
1 # RUN: llvm-mc %s -filetype obj -triple x86_64-linux-gnu -o - \
2 # RUN: | not llvm-dwarfdump -v -verify - 2>&1 \
3 # RUN: | FileCheck %s --implicit-check-not=error --implicit-check-not=warning
5 # CHECK: Verifying dwo Units...
6 # CHECK: error: Compilation unit root DIE is not a unit DIE: DW_TAG_null.
7 # CHECK: error: Compilation unit type (DW_UT_split_compile) and root DIE (DW_TAG_null) do not match.
8 # CHECK: error: Unsupported DW_AT_location encoding: DW_FORM_data1
9 # FIXME: This should read "type unit" or just "unit" to be correct for this case/in general
10 # CHECK: error: DIE has DW_AT_decl_file that references a file with index 1 and the compile unit has no line table
11 # CHECK: Errors detected
12 .section .debug_info.dwo,"e",@progbits
13 .long .Ldebug_info_dwo_end1-.Ldebug_info_dwo_start1 # Length of Unit
14 .Ldebug_info_dwo_start1:
15 .short 5 # DWARF version number
16 .byte 5 # DWARF Unit Type
17 .byte 8 # Address Size (in bytes)
18 .long 0 # Offset Into Abbrev. Section
19 .quad 1 # DWO ID
20 .quad 0
21 .Ldebug_info_dwo_end1:
22 .long .Ldebug_info_dwo_end2-.Ldebug_info_dwo_start2 # Length of Unit
23 .Ldebug_info_dwo_start2:
24 .short 5 # DWARF version number
25 .byte 5 # DWARF Unit Type
26 .byte 8 # Address Size (in bytes)
27 .long 0 # Offset Into Abbrev. Section
28 .quad 2 # DWO ID
29 .byte 1 # Abbrev [1] DW_TAG_compile_unit
30 .byte 0 # DW_AT_decl_file
31 .byte 0 # DW_AT_location
32 .Ldebug_info_dwo_end2:
33 .Ldebug_info_dwo_prestart3:
34 .long .Ldebug_info_dwo_end3-.Ldebug_info_dwo_start3 # Length of Unit
35 .Ldebug_info_dwo_start3:
36 .short 5 # DWARF version number
37 .byte 6 # DWARF Unit Type
38 .byte 8 # Address Size (in bytes)
39 .long 0 # Offset Into Abbrev. Section
40 .quad 3 # Type Signature
41 .long .Ldebug_info_dwo_die3-.Ldebug_info_dwo_prestart3 # Type DIE Offset
42 .Ldebug_info_dwo_die3:
43 .byte 2 # Abbrev [2] DW_TAG_type_unit
44 .byte 1 # DW_AT_decl_file
45 .Ldebug_info_dwo_end3:
46 .Ldebug_info_dwo_prestart4:
47 .long .Ldebug_info_dwo_end4-.Ldebug_info_dwo_start4 # Length of Unit
48 .Ldebug_info_dwo_start4:
49 .short 5 # DWARF version number
50 .byte 6 # DWARF Unit Type
51 .byte 8 # Address Size (in bytes)
52 .long 0 # Offset Into Abbrev. Section
53 .quad 4 # Type Signature
54 .long .Ldebug_info_dwo_die4-.Ldebug_info_dwo_prestart4 # Type DIE Offset
55 .Ldebug_info_dwo_die4:
56 .byte 3 # Abbrev [3] DW_TAG_type_unit
57 .long 0 # DW_AT_stmt_list
58 .byte 0 # DW_AT_decl_file
59 .Ldebug_info_dwo_end4:
60 .long .Ldebug_info_dwo_end5-.Ldebug_info_dwo_start5 # Length of Unit
61 .Ldebug_info_dwo_start5:
62 .short 5 # DWARF version number
63 .byte 5 # DWARF Unit Type
64 .byte 8 # Address Size (in bytes)
65 .long 0 # Offset Into Abbrev. Section
66 .quad 2 # DWO ID
67 .byte 4 # Abbrev [1] DW_TAG_compile_unit
68 .uleb128 0 # DW_AT_location
69 .Ldebug_info_dwo_end5:
70 .section .debug_abbrev.dwo,"e",@progbits
71 .byte 1 # Abbreviation Code
72 .byte 17 # DW_TAG_compile_unit
73 .byte 0 # DW_CHILDREN_no
74 .byte 58 # DW_AT_decl_file
75 .byte 11 # DW_FORM_data1
76 .byte 2 # DW_AT_location
77 .byte 11 # DW_FORM_data1
78 .byte 0 # EOM(1)
79 .byte 0 # EOM(2)
80 .byte 2 # Abbreviation Code
81 .byte 65 # DW_TAG_type_unit
82 .byte 0 # DW_CHILDREN_no
83 .byte 58 # DW_AT_decl_file
84 .byte 11 # DW_FORM_data1
85 .byte 0 # EOM(1)
86 .byte 0 # EOM(2)
87 .byte 3 # Abbreviation Code
88 .byte 65 # DW_TAG_type_unit
89 .byte 0 # DW_CHILDREN_no
90 .byte 16 # DW_AT_stmt_list
91 .byte 23 # DW_FORM_sec_offset
92 .byte 58 # DW_AT_decl_file
93 .byte 11 # DW_FORM_data1
94 .byte 0 # EOM(1)
95 .byte 0 # EOM(2)
96 .byte 4 # Abbreviation Code
97 .byte 17 # DW_TAG_compile_unit
98 .byte 0 # DW_CHILDREN_no
99 .byte 2 # DW_AT_location
100 .byte 34 # DW_FORM_loclistx
101 .byte 0 # EOM(1)
102 .byte 0 # EOM(2)
103 .byte 0 # EOM(3)
104 .section .debug_line.dwo,"e",@progbits
105 .Ltmp2:
106 .long .Ldebug_line_end0-.Ldebug_line_start0 # unit length
107 .Ldebug_line_start0:
108 .short 5
109 .byte 8
110 .byte 0
111 .long .Lprologue_end0-.Lprologue_start0
112 .Lprologue_start0:
113 .byte 1
114 .byte 1
115 .byte 1
116 .byte -5
117 .byte 14
118 .byte 1
119 .byte 1
120 .byte 1
121 .byte 8
122 .byte 1
123 .ascii "/usr/local/google/home/blaikie/dev/scratch"
124 .byte 0
125 .byte 3
126 .byte 1
127 .byte 8
128 .byte 2
129 .byte 15
130 .byte 5
131 .byte 30
132 .byte 1
133 .ascii "test.cpp"
134 .byte 0
135 .byte 0
136 .byte 0x5e, 0xc4, 0x4d, 0x3b
137 .byte 0x78, 0xd0, 0x2a, 0x57
138 .byte 0xd2, 0x75, 0xc1, 0x22
139 .byte 0x36, 0xb7, 0x17, 0xbf
140 .Lprologue_end0:
141 .Ldebug_line_end0:
142 .section .debug_loclists.dwo,"e",@progbits
143 .long .Ldebug_list_header_end0-.Ldebug_list_header_start0 # Length
144 .Ldebug_list_header_start0:
145 .short 5 # Version
146 .byte 8 # Address size
147 .byte 0 # Segment selector size
148 .long 1 # Offset entry count
149 .Lloclists_table_base0:
150 .long .Ldebug_loc0-.Lloclists_table_base0
151 .Ldebug_loc0:
152 .byte 1 # DW_LLE_base_addressx
153 .byte 0 # base address index
154 .byte 4 # DW_LLE_offset_pair
155 .uleb128 0 # starting offset
156 .uleb128 1 # ending offset
157 .byte 3 # Loc expr size
158 .byte 17 # DW_OP_consts
159 .byte 3 # 3
160 .byte 159 # DW_OP_stack_value
161 .byte 0 # DW_LLE_end_of_list
162 .Ldebug_list_header_end0: