• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llvm-mc %s -filetype obj -triple x86_64-apple-darwin -o %t.o
2# RUN: llvm-dwarfdump -diff %t.o | FileCheck %s
3
4# CHECK: DW_AT_type ("A*")
5# CHECK: DW_AT_specification ("A")
6# CHECK: DW_AT_object_pointer ()
7
8	.section	__TEXT,__text,regular,pure_instructions
9	.globl	__Z3fooi                ## -- Begin function _Z3fooi
10	.p2align	4, 0x90
11__Z3fooi:
12Lfunc_begin0:
13Ltmp0:
14Ltmp1:
15Lfunc_end0:
16__ZN1AC1Ev:
17Lfunc_begin1:
18Ltmp2:
19Ltmp3:
20Lfunc_end1:
21__ZN1AC2Ev:
22Lfunc_begin2:
23Ltmp4:
24Ltmp5:
25Lfunc_end2:
26                                        ## -- End function
27	.section	__DWARF,__debug_str,regular,debug
28Linfo_string:
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
42Lsection_abbrev:
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
50	.byte	3                       ## DW_AT_name
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
60	.byte	0                       ## EOM(1)
61	.byte	0                       ## EOM(2)
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
75	.byte	3                       ## DW_AT_name
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
85	.byte	0                       ## EOM(1)
86	.byte	0                       ## EOM(2)
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
98	.byte	0                       ## EOM(1)
99	.byte	0                       ## EOM(2)
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
107	.byte	0                       ## EOM(1)
108	.byte	0                       ## EOM(2)
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
122	.byte	0                       ## EOM(1)
123	.byte	0                       ## EOM(2)
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
137	.byte	0                       ## EOM(1)
138	.byte	0                       ## EOM(2)
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
154	.byte	0                       ## EOM(1)
155	.byte	0                       ## EOM(2)
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
169	.byte	0                       ## EOM(1)
170	.byte	0                       ## EOM(2)
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
178	.byte	0                       ## EOM(1)
179	.byte	0                       ## EOM(2)
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
189	.byte	0                       ## EOM(1)
190	.byte	0                       ## EOM(2)
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
196	.byte	0                       ## EOM(1)
197	.byte	0                       ## EOM(2)
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
215	.byte	0                       ## EOM(1)
216	.byte	0                       ## EOM(2)
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
232	.byte	0                       ## EOM(1)
233	.byte	0                       ## EOM(2)
234	.byte	0                       ## EOM(3)
235	.section	__DWARF,__debug_info,regular,debug
236Lsection_info:
237Lcu_begin0:
238	.long	244                     ## Length of Unit
239	.short	4                       ## DWARF version number
240.set Lset0, Lsection_abbrev-Lsection_abbrev ## Offset Into Abbrev. Section
241	.long	Lset0
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
248	.long	Lset1
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
252	.long	Lset2
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
256	.long	Lset3
257                                        ## DW_AT_APPLE_omit_frame_ptr
258	.byte	1                       ## DW_AT_frame_base
259	.byte	87
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
265                                        ## DW_AT_external
266	.byte	3                       ## Abbrev [3] 0x47:0xa DW_TAG_formal_parameter
267	.byte	2                       ## DW_AT_location
268	.byte	145
269	.byte	4
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
276	.long	Lset4
277	.byte	5                       ## Abbrev [5] 0x5e:0xe DW_TAG_variable
278	.byte	2                       ## DW_AT_location
279	.byte	145
280	.byte	0
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
304                                        ## DW_AT_declaration
305                                        ## DW_AT_external
306	.byte	9                       ## Abbrev [9] 0x8b:0x5 DW_TAG_formal_parameter
307	.long	153                     ## DW_AT_type
308                                        ## DW_AT_artificial
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
320	.long	Lset5
321                                        ## DW_AT_APPLE_omit_frame_ptr
322	.byte	1                       ## DW_AT_frame_base
323	.byte	87
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
329	.byte	145
330	.byte	0
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
335                                        ## DW_AT_artificial
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
340	.long	Lset6
341                                        ## DW_AT_APPLE_omit_frame_ptr
342	.byte	1                       ## DW_AT_frame_base
343	.byte	87
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
349	.byte	145
350	.byte	120
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
355                                        ## DW_AT_artificial
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
361Ldebug_macinfo:
362	.byte	0                       ## End Of Macro List Mark
363	.section	__DWARF,__apple_names,regular,debug
364Lnames_begin:
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
375	.long	0                       ## Bucket 0
376	.long	2                       ## Bucket 1
377	.long	-1                      ## Bucket 2
378	.long	3                       ## Bucket 3
379	.long	4                       ## Bucket 4
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
386	.long	Lset7
387.set Lset8, LNames3-Lnames_begin        ## Offset in Bucket 0
388	.long	Lset8
389.set Lset9, LNames2-Lnames_begin        ## Offset in Bucket 1
390	.long	Lset9
391.set Lset10, LNames0-Lnames_begin       ## Offset in Bucket 3
392	.long	Lset10
393.set Lset11, LNames1-Lnames_begin       ## Offset in Bucket 4
394	.long	Lset11
395LNames4:
396	.long	121                     ## _ZN1AC2Ev
397	.long	1                       ## Num DIEs
398	.long	200
399	.long	0
400LNames3:
401	.long	93                      ## _Z3fooi
402	.long	1                       ## Num DIEs
403	.long	42
404	.long	0
405LNames2:
406	.long	111                     ## _ZN1AC1Ev
407	.long	1                       ## Num DIEs
408	.long	158
409	.long	0
410LNames0:
411	.long	101                     ## A
412	.long	2                       ## Num DIEs
413	.long	158
414	.long	200
415	.long	0
416LNames1:
417	.long	89                      ## foo
418	.long	1                       ## Num DIEs
419	.long	42
420	.long	0
421	.section	__DWARF,__apple_objc,regular,debug
422Lobjc_begin:
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
433	.long	-1                      ## Bucket 0
434	.section	__DWARF,__apple_namespac,regular,debug
435Lnamespac_begin:
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
446	.long	-1                      ## Bucket 0
447	.section	__DWARF,__apple_types,regular,debug
448Ltypes_begin:
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
463	.long	0                       ## Bucket 0
464	.long	-1                      ## Bucket 1
465	.long	177638                  ## Hash in Bucket 0
466	.long	193495088               ## Hash in Bucket 0
467.set Lset12, Ltypes0-Ltypes_begin       ## Offset in Bucket 0
468	.long	Lset12
469.set Lset13, Ltypes1-Ltypes_begin       ## Offset in Bucket 0
470	.long	Lset13
471Ltypes0:
472	.long	101                     ## A
473	.long	1                       ## Num DIEs
474	.long	110
475	.short	2
476	.byte	0
477	.long	0
478Ltypes1:
479	.long	107                     ## int
480	.long	1                       ## Num DIEs
481	.long	146
482	.short	36
483	.byte	0
484	.long	0
485
486.subsections_via_symbols
487	.section	__DWARF,__debug_line,regular,debug
488Lsection_line:
489Lline_table_start0:
490