1 # RUN: llvm-mc %s -filetype obj -triple arm64-apple-darwin -o %t
2 # RUN: llvm-dwarfdump --debug-info %t | FileCheck %s
3 # RUN: llvm-dwarfdump --verify %t
5 # CHECK: 0x0000001e: DW_TAG_variable
6 # CHECK: DW_AT_name ("p1")
7 # CHECK: DW_AT_type (0x00000033 "void *__ptrauth(4, 1, 0x04d2)")
9 # CHECK: 0x00000033: DW_TAG_LLVM_ptrauth_type
10 # CHECK: DW_AT_LLVM_ptrauth_key (0x04)
11 # CHECK: DW_AT_LLVM_ptrauth_address_discriminated (true)
12 # CHECK: DW_AT_LLVM_ptrauth_extra_discriminator (0x04d2)
14 # CHECK: 0x0000003c: DW_TAG_variable
15 # CHECK: DW_AT_name ("p2")
16 # CHECK: DW_AT_type (0x00000047 "void *__ptrauth(4, 1, 0x04d3, "isa-pointer")")
18 # CHECK: 0x00000047: DW_TAG_LLVM_ptrauth_type
19 # CHECK: DW_AT_LLVM_ptrauth_key (0x04)
20 # CHECK: DW_AT_LLVM_ptrauth_address_discriminated (true)
21 # CHECK: DW_AT_LLVM_ptrauth_extra_discriminator (0x04d3)
22 # CHECK: DW_AT_LLVM_ptrauth_isa_pointer (true)
24 # CHECK: 0x0000004f: DW_TAG_variable
25 # CHECK: DW_AT_name ("p3")
26 # CHECK: DW_AT_type (0x0000005a "void *__ptrauth(4, 1, 0x04d4, "authenticates-null-values")")
28 # CHECK: 0x0000005a: DW_TAG_LLVM_ptrauth_type
29 # CHECK: DW_AT_LLVM_ptrauth_key (0x04)
30 # CHECK: DW_AT_LLVM_ptrauth_address_discriminated (true)
31 # CHECK: DW_AT_LLVM_ptrauth_extra_discriminator (0x04d4)
32 # CHECK: DW_AT_LLVM_ptrauth_authenticates_null_values (true)
34 # CHECK: 0x00000062: DW_TAG_variable
35 # CHECK: DW_AT_name ("p4")
36 # CHECK: DW_AT_type (0x0000006d "void *__ptrauth(4, 1, 0x04d5, "isa-pointer,authenticates-null-values")")
38 # CHECK: 0x0000006d: DW_TAG_LLVM_ptrauth_type
39 # CHECK: DW_AT_LLVM_ptrauth_key (0x04)
40 # CHECK: DW_AT_LLVM_ptrauth_address_discriminated (true)
41 # CHECK: DW_AT_LLVM_ptrauth_extra_discriminator (0x04d5)
42 # CHECK: DW_AT_LLVM_ptrauth_isa_pointer (true)
43 # CHECK: DW_AT_LLVM_ptrauth_authenticates_null_values (true)
45 .section __TEXT,__text,regular,pure_instructions
46 .file 1 "/" "/tmp/p.c"
48 .section __DWARF,__debug_abbrev,regular,debug
50 .byte 1 ; Abbreviation Code
51 .byte 17 ; DW_TAG_compile_unit
52 .byte 1 ; DW_CHILDREN_yes
53 .byte 37 ; DW_AT_producer
54 .byte 14 ; DW_FORM_strp
55 .byte 19 ; DW_AT_language
56 .byte 5 ; DW_FORM_data2
58 .byte 14 ; DW_FORM_strp
59 .byte 16 ; DW_AT_stmt_list
60 .byte 23 ; DW_FORM_sec_offset
61 .byte 27 ; DW_AT_comp_dir
62 .byte 14 ; DW_FORM_strp
65 .byte 2 ; Abbreviation Code
66 .byte 52 ; DW_TAG_variable
67 .byte 0 ; DW_CHILDREN_no
69 .byte 14 ; DW_FORM_strp
71 .byte 19 ; DW_FORM_ref4
72 .byte 63 ; DW_AT_external
73 .byte 25 ; DW_FORM_flag_present
74 .byte 58 ; DW_AT_decl_file
75 .byte 11 ; DW_FORM_data1
76 .byte 59 ; DW_AT_decl_line
77 .byte 11 ; DW_FORM_data1
78 .byte 2 ; DW_AT_location
79 .byte 24 ; DW_FORM_exprloc
82 .byte 3 ; Abbreviation Code
83 .ascii "\200\206\001" ; DW_TAG_LLVM_ptrauth_type
84 .byte 0 ; DW_CHILDREN_no
86 .byte 19 ; DW_FORM_ref4
87 .ascii "\204|" ; DW_AT_LLVM_ptrauth_key
88 .byte 11 ; DW_FORM_data1
89 .ascii "\205|" ; DW_AT_LLVM_ptrauth_address_discriminated
90 .byte 25 ; DW_FORM_flag_present
91 .ascii "\206|" ; DW_AT_LLVM_ptrauth_extra_discriminator
92 .byte 5 ; DW_FORM_data2
95 .byte 4 ; Abbreviation Code
96 .byte 15 ; DW_TAG_pointer_type
97 .byte 0 ; DW_CHILDREN_no
100 .byte 5 ; Abbreviation Code
101 .byte 52 ; DW_TAG_variable
102 .byte 0 ; DW_CHILDREN_no
104 .byte 14 ; DW_FORM_strp
105 .byte 73 ; DW_AT_type
106 .byte 19 ; DW_FORM_ref4
107 .byte 63 ; DW_AT_external
108 .byte 25 ; DW_FORM_flag_present
109 .byte 58 ; DW_AT_decl_file
110 .byte 11 ; DW_FORM_data1
111 .byte 59 ; DW_AT_decl_line
112 .byte 11 ; DW_FORM_data1
115 .byte 6 ; Abbreviation Code
116 .ascii "\200\206\001" ; DW_TAG_LLVM_ptrauth_type
117 .byte 0 ; DW_CHILDREN_no
118 .byte 73 ; DW_AT_type
119 .byte 19 ; DW_FORM_ref4
120 .ascii "\204|" ; DW_AT_LLVM_ptrauth_key
121 .byte 11 ; DW_FORM_data1
122 .ascii "\205|" ; DW_AT_LLVM_ptrauth_address_discriminated
123 .byte 25 ; DW_FORM_flag_present
124 .ascii "\206|" ; DW_AT_LLVM_ptrauth_extra_discriminator
125 .byte 5 ; DW_FORM_data2
126 .ascii "\210|" ; DW_AT_LLVM_ptrauth_isa_pointer
127 .byte 25 ; DW_FORM_flag_present
130 .byte 7 ; Abbreviation Code
131 .ascii "\200\206\001" ; DW_TAG_LLVM_ptrauth_type
132 .byte 0 ; DW_CHILDREN_no
133 .byte 73 ; DW_AT_type
134 .byte 19 ; DW_FORM_ref4
135 .ascii "\204|" ; DW_AT_LLVM_ptrauth_key
136 .byte 11 ; DW_FORM_data1
137 .ascii "\205|" ; DW_AT_LLVM_ptrauth_address_discriminated
138 .byte 25 ; DW_FORM_flag_present
139 .ascii "\206|" ; DW_AT_LLVM_ptrauth_extra_discriminator
140 .byte 5 ; DW_FORM_data2
141 .ascii "\211|" ; DW_AT_LLVM_ptrauth_authenticates_null_values
142 .byte 25 ; DW_FORM_flag_present
145 .byte 8 ; Abbreviation Code
146 .ascii "\200\206\001" ; DW_TAG_LLVM_ptrauth_type
147 .byte 0 ; DW_CHILDREN_no
148 .byte 73 ; DW_AT_type
149 .byte 19 ; DW_FORM_ref4
150 .ascii "\204|" ; DW_AT_LLVM_ptrauth_key
151 .byte 11 ; DW_FORM_data1
152 .ascii "\205|" ; DW_AT_LLVM_ptrauth_address_discriminated
153 .byte 25 ; DW_FORM_flag_present
154 .ascii "\206|" ; DW_AT_LLVM_ptrauth_extra_discriminator
155 .byte 5 ; DW_FORM_data2
156 .ascii "\210|" ; DW_AT_LLVM_ptrauth_isa_pointer
157 .byte 25 ; DW_FORM_flag_present
158 .ascii "\211|" ; DW_AT_LLVM_ptrauth_authenticates_null_values
159 .byte 25 ; DW_FORM_flag_present
163 .section __DWARF,__debug_info,regular,debug
166 .set Lset0, Ldebug_info_end0-Ldebug_info_start0 ; Length of Unit
169 .short 4 ; DWARF version number
170 .set Lset1, Lsection_abbrev-Lsection_abbrev ; Offset Into Abbrev. Section
172 .byte 8 ; Address Size (in bytes)
173 .byte 1 ; Abbrev [1] 0xb:0x6b DW_TAG_compile_unit
174 .long 0 ; DW_AT_producer
175 .short 12 ; DW_AT_language
177 .set Lset2, Lline_table_start0-Lsection_line ; DW_AT_stmt_list
179 .long 10 ; DW_AT_comp_dir
180 .byte 2 ; Abbrev [2] 0x1e:0x15 DW_TAG_variable
181 .long 12 ; DW_AT_name
182 .long 51 ; DW_AT_type
184 .byte 1 ; DW_AT_decl_file
185 .byte 1 ; DW_AT_decl_line
186 .byte 9 ; DW_AT_location
189 .byte 3 ; Abbrev [3] 0x33:0x8 DW_TAG_LLVM_ptrauth_type
190 .long 59 ; DW_AT_type
191 .byte 4 ; DW_AT_LLVM_ptrauth_key
192 ; DW_AT_LLVM_ptrauth_address_discriminated
193 .short 1234 ; DW_AT_LLVM_ptrauth_extra_discriminator
194 .byte 4 ; Abbrev [4] 0x3b:0x1 DW_TAG_pointer_type
195 .byte 5 ; Abbrev [5] 0x3c:0xb DW_TAG_variable
196 .long 15 ; DW_AT_name
197 .long 71 ; DW_AT_type
199 .byte 1 ; DW_AT_decl_file
200 .byte 1 ; DW_AT_decl_line
201 .byte 6 ; Abbrev [6] 0x47:0x8 DW_TAG_LLVM_ptrauth_type
202 .long 59 ; DW_AT_type
203 .byte 4 ; DW_AT_LLVM_ptrauth_key
204 ; DW_AT_LLVM_ptrauth_address_discriminated
205 .short 1235 ; DW_AT_LLVM_ptrauth_extra_discriminator
206 ; DW_AT_LLVM_ptrauth_isa_pointer
207 .byte 5 ; Abbrev [5] 0x4f:0xb DW_TAG_variable
208 .long 18 ; DW_AT_name
209 .long 90 ; DW_AT_type
211 .byte 1 ; DW_AT_decl_file
212 .byte 1 ; DW_AT_decl_line
213 .byte 7 ; Abbrev [7] 0x5a:0x8 DW_TAG_LLVM_ptrauth_type
214 .long 59 ; DW_AT_type
215 .byte 4 ; DW_AT_LLVM_ptrauth_key
216 ; DW_AT_LLVM_ptrauth_address_discriminated
217 .short 1236 ; DW_AT_LLVM_ptrauth_extra_discriminator
218 ; DW_AT_LLVM_ptrauth_authenticates_null_values
219 .byte 5 ; Abbrev [5] 0x62:0xb DW_TAG_variable
220 .long 21 ; DW_AT_name
221 .long 109 ; DW_AT_type
223 .byte 1 ; DW_AT_decl_file
224 .byte 1 ; DW_AT_decl_line
225 .byte 8 ; Abbrev [8] 0x6d:0x8 DW_TAG_LLVM_ptrauth_type
226 .long 59 ; DW_AT_type
227 .byte 4 ; DW_AT_LLVM_ptrauth_key
228 ; DW_AT_LLVM_ptrauth_address_discriminated
229 .short 1237 ; DW_AT_LLVM_ptrauth_extra_discriminator
230 ; DW_AT_LLVM_ptrauth_isa_pointer
231 ; DW_AT_LLVM_ptrauth_authenticates_null_values
232 .byte 0 ; End Of Children Mark
234 .section __DWARF,__debug_str,regular,debug
236 .byte 0 ; string offset=0
237 .asciz "/tmp/p.c" ; string offset=1
238 .asciz "/" ; string offset=10
239 .asciz "p1" ; string offset=12
240 .asciz "p2" ; string offset=15
241 .asciz "p3" ; string offset=18
242 .asciz "p4" ; string offset=21
243 .section __DWARF,__apple_names,regular,debug
245 .long 1212240712 ; Header Magic
246 .short 1 ; Header Version
247 .short 0 ; Header Hash Function
248 .long 1 ; Header Bucket Count
249 .long 1 ; Header Hash Count
250 .long 12 ; Header Data Length
251 .long 0 ; HeaderData Die Offset Base
252 .long 1 ; HeaderData Atom Count
253 .short 1 ; DW_ATOM_die_offset
254 .short 6 ; DW_FORM_data4
256 .long 5863654 ; Hash in Bucket 0
257 .set Lset3, LNames0-Lnames_begin ; Offset in Bucket 0
264 .section __DWARF,__apple_objc,regular,debug
266 .long 1212240712 ; Header Magic
267 .short 1 ; Header Version
268 .short 0 ; Header Hash Function
269 .long 1 ; Header Bucket Count
270 .long 0 ; Header Hash Count
271 .long 12 ; Header Data Length
272 .long 0 ; HeaderData Die Offset Base
273 .long 1 ; HeaderData Atom Count
274 .short 1 ; DW_ATOM_die_offset
275 .short 6 ; DW_FORM_data4
277 .section __DWARF,__apple_namespac,regular,debug
279 .long 1212240712 ; Header Magic
280 .short 1 ; Header Version
281 .short 0 ; Header Hash Function
282 .long 1 ; Header Bucket Count
283 .long 0 ; Header Hash Count
284 .long 12 ; Header Data Length
285 .long 0 ; HeaderData Die Offset Base
286 .long 1 ; HeaderData Atom Count
287 .short 1 ; DW_ATOM_die_offset
288 .short 6 ; DW_FORM_data4
290 .section __DWARF,__apple_types,regular,debug
292 .long 1212240712 ; Header Magic
293 .short 1 ; Header Version
294 .short 0 ; Header Hash Function
295 .long 1 ; Header Bucket Count
296 .long 0 ; Header Hash Count
297 .long 20 ; Header Data Length
298 .long 0 ; HeaderData Die Offset Base
299 .long 3 ; HeaderData Atom Count
300 .short 1 ; DW_ATOM_die_offset
301 .short 6 ; DW_FORM_data4
302 .short 3 ; DW_ATOM_die_tag
303 .short 5 ; DW_FORM_data2
304 .short 4 ; DW_ATOM_type_flags
305 .short 11 ; DW_FORM_data1
307 .subsections_via_symbols
308 .section __DWARF,__debug_line,regular,debug