1 # RUN: llvm-mc %s -filetype obj -triple x86_64-apple-darwin -o %t.o
2 # RUN: llvm-dwarfdump -diff %t.o | FileCheck %s
4 # CHECK: DW_AT_type ("A*")
5 # CHECK: DW_AT_specification ("A")
6 # CHECK: DW_AT_object_pointer ()
8 .section __TEXT,__text,regular,pure_instructions
9 .globl __Z3fooi ## -- Begin function _Z3fooi
27 .section __DWARF,__debug_str,regular,debug
29 .asciz "clang version 3.2 (trunk 163586) (llvm/trunk 163570)" ## string offset=0
30 .asciz "bar.cpp" ## string offset=53
31 .asciz "/Users/echristo/debug-tests" ## string offset=61
32 .asciz "foo" ## string offset=89
33 .asciz "_Z3fooi" ## string offset=93
34 .asciz "A" ## string offset=101
35 .asciz "m_a" ## string offset=103
36 .asciz "int" ## string offset=107
37 .asciz "_ZN1AC1Ev" ## string offset=111
38 .asciz "_ZN1AC2Ev" ## string offset=121
39 .asciz "a" ## string offset=131
40 .asciz "this" ## string offset=133
41 .section __DWARF,__debug_abbrev,regular,debug
43 .byte 1 ## Abbreviation Code
44 .byte 17 ## DW_TAG_compile_unit
45 .byte 1 ## DW_CHILDREN_yes
46 .byte 37 ## DW_AT_producer
47 .byte 14 ## DW_FORM_strp
48 .byte 19 ## DW_AT_language
49 .byte 5 ## DW_FORM_data2
51 .byte 14 ## DW_FORM_strp
52 .byte 16 ## DW_AT_stmt_list
53 .byte 23 ## DW_FORM_sec_offset
54 .byte 27 ## DW_AT_comp_dir
55 .byte 14 ## DW_FORM_strp
56 .byte 17 ## DW_AT_low_pc
57 .byte 1 ## DW_FORM_addr
58 .byte 18 ## DW_AT_high_pc
59 .byte 6 ## DW_FORM_data4
62 .byte 2 ## Abbreviation Code
63 .byte 46 ## DW_TAG_subprogram
64 .byte 1 ## DW_CHILDREN_yes
65 .byte 17 ## DW_AT_low_pc
66 .byte 1 ## DW_FORM_addr
67 .byte 18 ## DW_AT_high_pc
68 .byte 6 ## DW_FORM_data4
69 .ascii "\347\177" ## DW_AT_APPLE_omit_frame_ptr
70 .byte 25 ## DW_FORM_flag_present
71 .byte 64 ## DW_AT_frame_base
72 .byte 24 ## DW_FORM_exprloc
73 .byte 110 ## DW_AT_linkage_name
74 .byte 14 ## DW_FORM_strp
76 .byte 14 ## DW_FORM_strp
77 .byte 58 ## DW_AT_decl_file
78 .byte 11 ## DW_FORM_data1
79 .byte 59 ## DW_AT_decl_line
80 .byte 11 ## DW_FORM_data1
81 .byte 73 ## DW_AT_type
82 .byte 19 ## DW_FORM_ref4
83 .byte 63 ## DW_AT_external
84 .byte 25 ## DW_FORM_flag_present
87 .byte 3 ## Abbreviation Code
88 .byte 5 ## DW_TAG_formal_parameter
89 .byte 0 ## DW_CHILDREN_no
90 .byte 2 ## DW_AT_location
91 .byte 24 ## DW_FORM_exprloc
92 .byte 58 ## DW_AT_decl_file
93 .byte 11 ## DW_FORM_data1
94 .byte 59 ## DW_AT_decl_line
95 .byte 11 ## DW_FORM_data1
96 .byte 73 ## DW_AT_type
97 .byte 19 ## DW_FORM_ref4
100 .byte 4 ## Abbreviation Code
101 .byte 11 ## DW_TAG_lexical_block
102 .byte 1 ## DW_CHILDREN_yes
103 .byte 17 ## DW_AT_low_pc
104 .byte 1 ## DW_FORM_addr
105 .byte 18 ## DW_AT_high_pc
106 .byte 6 ## DW_FORM_data4
109 .byte 5 ## Abbreviation Code
110 .byte 52 ## DW_TAG_variable
111 .byte 0 ## DW_CHILDREN_no
112 .byte 2 ## DW_AT_location
113 .byte 24 ## DW_FORM_exprloc
114 .byte 3 ## DW_AT_name
115 .byte 14 ## DW_FORM_strp
116 .byte 58 ## DW_AT_decl_file
117 .byte 11 ## DW_FORM_data1
118 .byte 59 ## DW_AT_decl_line
119 .byte 11 ## DW_FORM_data1
120 .byte 73 ## DW_AT_type
121 .byte 19 ## DW_FORM_ref4
124 .byte 6 ## Abbreviation Code
125 .byte 2 ## DW_TAG_class_type
126 .byte 1 ## DW_CHILDREN_yes
127 .byte 3 ## DW_AT_name
128 .byte 14 ## DW_FORM_strp
129 .byte 11 ## DW_AT_byte_size
130 .byte 11 ## DW_FORM_data1
131 .byte 58 ## DW_AT_decl_file
132 .byte 11 ## DW_FORM_data1
133 .byte 59 ## DW_AT_decl_line
134 .byte 11 ## DW_FORM_data1
135 .ascii "\210\001" ## DW_AT_alignment
136 .byte 15 ## DW_FORM_udata
139 .byte 7 ## Abbreviation Code
140 .byte 13 ## DW_TAG_member
141 .byte 0 ## DW_CHILDREN_no
142 .byte 3 ## DW_AT_name
143 .byte 14 ## DW_FORM_strp
144 .byte 73 ## DW_AT_type
145 .byte 19 ## DW_FORM_ref4
146 .byte 58 ## DW_AT_decl_file
147 .byte 11 ## DW_FORM_data1
148 .byte 59 ## DW_AT_decl_line
149 .byte 11 ## DW_FORM_data1
150 .ascii "\210\001" ## DW_AT_alignment
151 .byte 15 ## DW_FORM_udata
152 .byte 56 ## DW_AT_data_member_location
153 .byte 11 ## DW_FORM_data1
156 .byte 8 ## Abbreviation Code
157 .byte 46 ## DW_TAG_subprogram
158 .byte 1 ## DW_CHILDREN_yes
159 .byte 3 ## DW_AT_name
160 .byte 14 ## DW_FORM_strp
161 .byte 58 ## DW_AT_decl_file
162 .byte 11 ## DW_FORM_data1
163 .byte 59 ## DW_AT_decl_line
164 .byte 11 ## DW_FORM_data1
165 .byte 60 ## DW_AT_declaration
166 .byte 25 ## DW_FORM_flag_present
167 .byte 63 ## DW_AT_external
168 .byte 25 ## DW_FORM_flag_present
171 .byte 9 ## Abbreviation Code
172 .byte 5 ## DW_TAG_formal_parameter
173 .byte 0 ## DW_CHILDREN_no
174 .byte 73 ## DW_AT_type
175 .byte 19 ## DW_FORM_ref4
176 .byte 52 ## DW_AT_artificial
177 .byte 25 ## DW_FORM_flag_present
180 .byte 10 ## Abbreviation Code
181 .byte 36 ## DW_TAG_base_type
182 .byte 0 ## DW_CHILDREN_no
183 .byte 3 ## DW_AT_name
184 .byte 14 ## DW_FORM_strp
185 .byte 62 ## DW_AT_encoding
186 .byte 11 ## DW_FORM_data1
187 .byte 11 ## DW_AT_byte_size
188 .byte 11 ## DW_FORM_data1
191 .byte 11 ## Abbreviation Code
192 .byte 15 ## DW_TAG_pointer_type
193 .byte 0 ## DW_CHILDREN_no
194 .byte 73 ## DW_AT_type
195 .byte 19 ## DW_FORM_ref4
198 .byte 12 ## Abbreviation Code
199 .byte 46 ## DW_TAG_subprogram
200 .byte 1 ## DW_CHILDREN_yes
201 .byte 17 ## DW_AT_low_pc
202 .byte 1 ## DW_FORM_addr
203 .byte 18 ## DW_AT_high_pc
204 .byte 6 ## DW_FORM_data4
205 .ascii "\347\177" ## DW_AT_APPLE_omit_frame_ptr
206 .byte 25 ## DW_FORM_flag_present
207 .byte 64 ## DW_AT_frame_base
208 .byte 24 ## DW_FORM_exprloc
209 .byte 100 ## DW_AT_object_pointer
210 .byte 19 ## DW_FORM_ref4
211 .byte 110 ## DW_AT_linkage_name
212 .byte 14 ## DW_FORM_strp
213 .byte 71 ## DW_AT_specification
214 .byte 19 ## DW_FORM_ref4
217 .byte 13 ## Abbreviation Code
218 .byte 5 ## DW_TAG_formal_parameter
219 .byte 0 ## DW_CHILDREN_no
220 .byte 2 ## DW_AT_location
221 .byte 24 ## DW_FORM_exprloc
222 .byte 3 ## DW_AT_name
223 .byte 14 ## DW_FORM_strp
224 .byte 58 ## DW_AT_decl_file
225 .byte 11 ## DW_FORM_data1
226 .byte 59 ## DW_AT_decl_line
227 .byte 11 ## DW_FORM_data1
228 .byte 73 ## DW_AT_type
229 .byte 19 ## DW_FORM_ref4
230 .byte 52 ## DW_AT_artificial
231 .byte 25 ## DW_FORM_flag_present
235 .section __DWARF,__debug_info,regular,debug
238 .long 244 ## Length of Unit
239 .short 4 ## DWARF version number
240 .set Lset0, Lsection_abbrev-Lsection_abbrev ## Offset Into Abbrev. Section
242 .byte 8 ## Address Size (in bytes)
243 .byte 1 ## Abbrev [1] 0xb:0xed DW_TAG_compile_unit
244 .long 0 ## DW_AT_producer
245 .short 4 ## DW_AT_language
246 .long 53 ## DW_AT_name
247 .set Lset1, Lline_table_start0-Lsection_line ## DW_AT_stmt_list
249 .long 61 ## DW_AT_comp_dir
250 .quad Lfunc_begin0 ## DW_AT_low_pc
251 .set Lset2, Lfunc_end2-Lfunc_begin0 ## DW_AT_high_pc
253 .byte 2 ## Abbrev [2] 0x2a:0x44 DW_TAG_subprogram
254 .quad Lfunc_begin0 ## DW_AT_low_pc
255 .set Lset3, Lfunc_end0-Lfunc_begin0 ## DW_AT_high_pc
257 ## DW_AT_APPLE_omit_frame_ptr
258 .byte 1 ## DW_AT_frame_base
260 .long 93 ## DW_AT_linkage_name
261 .long 89 ## DW_AT_name
262 .byte 1 ## DW_AT_decl_file
263 .byte 7 ## DW_AT_decl_line
264 .long 146 ## DW_AT_type
266 .byte 3 ## Abbrev [3] 0x47:0xa DW_TAG_formal_parameter
267 .byte 2 ## DW_AT_location
270 .byte 1 ## DW_AT_decl_file
271 .byte 7 ## DW_AT_decl_line
272 .long 146 ## DW_AT_type
273 .byte 4 ## Abbrev [4] 0x51:0x1c DW_TAG_lexical_block
274 .quad Ltmp0 ## DW_AT_low_pc
275 .set Lset4, Ltmp1-Ltmp0 ## DW_AT_high_pc
277 .byte 5 ## Abbrev [5] 0x5e:0xe DW_TAG_variable
278 .byte 2 ## DW_AT_location
281 .long 131 ## DW_AT_name
282 .byte 1 ## DW_AT_decl_file
283 .byte 8 ## DW_AT_decl_line
284 .long 110 ## DW_AT_type
285 .byte 0 ## End Of Children Mark
286 .byte 0 ## End Of Children Mark
287 .byte 6 ## Abbrev [6] 0x6e:0x24 DW_TAG_class_type
288 .long 101 ## DW_AT_name
289 .byte 4 ## DW_AT_byte_size
290 .byte 1 ## DW_AT_decl_file
291 .byte 1 ## DW_AT_decl_line
292 .byte 4 ## DW_AT_alignment
293 .byte 7 ## Abbrev [7] 0x77:0xd DW_TAG_member
294 .long 103 ## DW_AT_name
295 .long 146 ## DW_AT_type
296 .byte 1 ## DW_AT_decl_file
297 .byte 4 ## DW_AT_decl_line
298 .byte 4 ## DW_AT_alignment
299 .byte 0 ## DW_AT_data_member_location
300 .byte 8 ## Abbrev [8] 0x84:0xd DW_TAG_subprogram
301 .long 101 ## DW_AT_name
302 .byte 1 ## DW_AT_decl_file
303 .byte 3 ## DW_AT_decl_line
306 .byte 9 ## Abbrev [9] 0x8b:0x5 DW_TAG_formal_parameter
307 .long 153 ## DW_AT_type
309 .byte 0 ## End Of Children Mark
310 .byte 0 ## End Of Children Mark
311 .byte 10 ## Abbrev [10] 0x92:0x7 DW_TAG_base_type
312 .long 107 ## DW_AT_name
313 .byte 5 ## DW_AT_encoding
314 .byte 4 ## DW_AT_byte_size
315 .byte 11 ## Abbrev [11] 0x99:0x5 DW_TAG_pointer_type
316 .long 110 ## DW_AT_type
317 .byte 12 ## Abbrev [12] 0x9e:0x2a DW_TAG_subprogram
318 .quad Lfunc_begin1 ## DW_AT_low_pc
319 .set Lset5, Lfunc_end1-Lfunc_begin1 ## DW_AT_high_pc
321 ## DW_AT_APPLE_omit_frame_ptr
322 .byte 1 ## DW_AT_frame_base
324 .long 185 ## DW_AT_object_pointer
325 .long 111 ## DW_AT_linkage_name
326 .long 132 ## DW_AT_specification
327 .byte 13 ## Abbrev [13] 0xb9:0xe DW_TAG_formal_parameter
328 .byte 2 ## DW_AT_location
331 .long 133 ## DW_AT_name
332 .byte 1 ## DW_AT_decl_file
333 .byte 3 ## DW_AT_decl_line
334 .long 242 ## DW_AT_type
336 .byte 0 ## End Of Children Mark
337 .byte 12 ## Abbrev [12] 0xc8:0x2a DW_TAG_subprogram
338 .quad Lfunc_begin2 ## DW_AT_low_pc
339 .set Lset6, Lfunc_end2-Lfunc_begin2 ## DW_AT_high_pc
341 ## DW_AT_APPLE_omit_frame_ptr
342 .byte 1 ## DW_AT_frame_base
344 .long 227 ## DW_AT_object_pointer
345 .long 121 ## DW_AT_linkage_name
346 .long 132 ## DW_AT_specification
347 .byte 13 ## Abbrev [13] 0xe3:0xe DW_TAG_formal_parameter
348 .byte 2 ## DW_AT_location
351 .long 133 ## DW_AT_name
352 .byte 1 ## DW_AT_decl_file
353 .byte 3 ## DW_AT_decl_line
354 .long 242 ## DW_AT_type
356 .byte 0 ## End Of Children Mark
357 .byte 11 ## Abbrev [11] 0xf2:0x5 DW_TAG_pointer_type
358 .long 110 ## DW_AT_type
359 .byte 0 ## End Of Children Mark
360 .section __DWARF,__debug_macinfo,regular,debug
362 .byte 0 ## End Of Macro List Mark
363 .section __DWARF,__apple_names,regular,debug
365 .long 1212240712 ## Header Magic
366 .short 1 ## Header Version
367 .short 0 ## Header Hash Function
368 .long 5 ## Header Bucket Count
369 .long 5 ## Header Hash Count
370 .long 12 ## Header Data Length
371 .long 0 ## HeaderData Die Offset Base
372 .long 1 ## HeaderData Atom Count
373 .short 1 ## DW_ATOM_die_offset
374 .short 6 ## DW_FORM_data4
380 .long 649621230 ## Hash in Bucket 0
381 .long 1784752350 ## Hash in Bucket 0
382 .long 649620141 ## Hash in Bucket 1
383 .long 177638 ## Hash in Bucket 3
384 .long 193491849 ## Hash in Bucket 4
385 .set Lset7, LNames4-Lnames_begin ## Offset in Bucket 0
387 .set Lset8, LNames3-Lnames_begin ## Offset in Bucket 0
389 .set Lset9, LNames2-Lnames_begin ## Offset in Bucket 1
391 .set Lset10, LNames0-Lnames_begin ## Offset in Bucket 3
393 .set Lset11, LNames1-Lnames_begin ## Offset in Bucket 4
396 .long 121 ## _ZN1AC2Ev
406 .long 111 ## _ZN1AC1Ev
421 .section __DWARF,__apple_objc,regular,debug
423 .long 1212240712 ## Header Magic
424 .short 1 ## Header Version
425 .short 0 ## Header Hash Function
426 .long 1 ## Header Bucket Count
427 .long 0 ## Header Hash Count
428 .long 12 ## Header Data Length
429 .long 0 ## HeaderData Die Offset Base
430 .long 1 ## HeaderData Atom Count
431 .short 1 ## DW_ATOM_die_offset
432 .short 6 ## DW_FORM_data4
434 .section __DWARF,__apple_namespac,regular,debug
436 .long 1212240712 ## Header Magic
437 .short 1 ## Header Version
438 .short 0 ## Header Hash Function
439 .long 1 ## Header Bucket Count
440 .long 0 ## Header Hash Count
441 .long 12 ## Header Data Length
442 .long 0 ## HeaderData Die Offset Base
443 .long 1 ## HeaderData Atom Count
444 .short 1 ## DW_ATOM_die_offset
445 .short 6 ## DW_FORM_data4
447 .section __DWARF,__apple_types,regular,debug
449 .long 1212240712 ## Header Magic
450 .short 1 ## Header Version
451 .short 0 ## Header Hash Function
452 .long 2 ## Header Bucket Count
453 .long 2 ## Header Hash Count
454 .long 20 ## Header Data Length
455 .long 0 ## HeaderData Die Offset Base
456 .long 3 ## HeaderData Atom Count
457 .short 1 ## DW_ATOM_die_offset
458 .short 6 ## DW_FORM_data4
459 .short 3 ## DW_ATOM_die_tag
460 .short 5 ## DW_FORM_data2
461 .short 4 ## DW_ATOM_type_flags
462 .short 11 ## DW_FORM_data1
465 .long 177638 ## Hash in Bucket 0
466 .long 193495088 ## Hash in Bucket 0
467 .set Lset12, Ltypes0-Ltypes_begin ## Offset in Bucket 0
469 .set Lset13, Ltypes1-Ltypes_begin ## Offset in Bucket 0
486 .subsections_via_symbols
487 .section __DWARF,__debug_line,regular,debug