xref: /llvm-project/bolt/test/X86/Inputs/dwarf5-debug-names-helper.s (revision 6de5fcc74637116581d7b9b39c16fc252a5a54ef)
1# clang++ -g2 -gdwarf-5 -gpubnames -fdebug-types-section -S
2# header.h
3# struct Foo2a {
4#   char *c1;
5#   char *c2;
6#   char *c3;
7# };
8# helper.cpp
9# #include "header.h"
10# int fooint;
11# struct Foo2Int {
12#    int *c1;
13#    int *c2;
14# };
15#
16# int foo() {
17#   Foo2Int fint;
18#   Foo2a f;
19#   return 0;
20# }
21
22	.text
23	.file	"helper.cpp"
24	.file	0 "/typeDedup" "helper.cpp" md5 0xc33186b2db66a78883b1546aace9855d
25	.globl	_Z3foov                         # -- Begin function _Z3foov
26	.p2align	4, 0x90
27	.type	_Z3foov,@function
28_Z3foov:                                # @_Z3foov
29.Lfunc_begin0:
30	.loc	0 8 0                           # helper.cpp:8:0
31	.cfi_startproc
32# %bb.0:                                # %entry
33	pushq	%rbp
34	.cfi_def_cfa_offset 16
35	.cfi_offset %rbp, -16
36	movq	%rsp, %rbp
37	.cfi_def_cfa_register %rbp
38.Ltmp0:
39	.loc	0 11 3 prologue_end             # helper.cpp:11:3
40	xorl	%eax, %eax
41	.loc	0 11 3 epilogue_begin is_stmt 0 # helper.cpp:11:3
42	popq	%rbp
43	.cfi_def_cfa %rsp, 8
44	retq
45.Ltmp1:
46.Lfunc_end0:
47	.size	_Z3foov, .Lfunc_end0-_Z3foov
48	.cfi_endproc
49                                        # -- End function
50	.type	fooint,@object                  # @fooint
51	.bss
52	.globl	fooint
53	.p2align	2, 0x0
54fooint:
55	.long	0                               # 0x0
56	.size	fooint, 4
57
58	.file	1 "." "header.h" md5 0xfea7bb1f22c47f129e15695f7137a1e7
59	.section	.debug_abbrev,"",@progbits
60	.byte	1                               # Abbreviation Code
61	.byte	17                              # DW_TAG_compile_unit
62	.byte	1                               # DW_CHILDREN_yes
63	.byte	37                              # DW_AT_producer
64	.byte	37                              # DW_FORM_strx1
65	.byte	19                              # DW_AT_language
66	.byte	5                               # DW_FORM_data2
67	.byte	3                               # DW_AT_name
68	.byte	37                              # DW_FORM_strx1
69	.byte	114                             # DW_AT_str_offsets_base
70	.byte	23                              # DW_FORM_sec_offset
71	.byte	16                              # DW_AT_stmt_list
72	.byte	23                              # DW_FORM_sec_offset
73	.byte	27                              # DW_AT_comp_dir
74	.byte	37                              # DW_FORM_strx1
75	.byte	17                              # DW_AT_low_pc
76	.byte	27                              # DW_FORM_addrx
77	.byte	18                              # DW_AT_high_pc
78	.byte	6                               # DW_FORM_data4
79	.byte	115                             # DW_AT_addr_base
80	.byte	23                              # DW_FORM_sec_offset
81	.byte	0                               # EOM(1)
82	.byte	0                               # EOM(2)
83	.byte	2                               # Abbreviation Code
84	.byte	52                              # DW_TAG_variable
85	.byte	0                               # DW_CHILDREN_no
86	.byte	3                               # DW_AT_name
87	.byte	37                              # DW_FORM_strx1
88	.byte	73                              # DW_AT_type
89	.byte	19                              # DW_FORM_ref4
90	.byte	63                              # DW_AT_external
91	.byte	25                              # DW_FORM_flag_present
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	2                               # DW_AT_location
97	.byte	24                              # DW_FORM_exprloc
98	.byte	0                               # EOM(1)
99	.byte	0                               # EOM(2)
100	.byte	3                               # Abbreviation Code
101	.byte	36                              # DW_TAG_base_type
102	.byte	0                               # DW_CHILDREN_no
103	.byte	3                               # DW_AT_name
104	.byte	37                              # DW_FORM_strx1
105	.byte	62                              # DW_AT_encoding
106	.byte	11                              # DW_FORM_data1
107	.byte	11                              # DW_AT_byte_size
108	.byte	11                              # DW_FORM_data1
109	.byte	0                               # EOM(1)
110	.byte	0                               # EOM(2)
111	.byte	4                               # Abbreviation Code
112	.byte	46                              # DW_TAG_subprogram
113	.byte	1                               # DW_CHILDREN_yes
114	.byte	17                              # DW_AT_low_pc
115	.byte	27                              # DW_FORM_addrx
116	.byte	18                              # DW_AT_high_pc
117	.byte	6                               # DW_FORM_data4
118	.byte	64                              # DW_AT_frame_base
119	.byte	24                              # DW_FORM_exprloc
120	.byte	110                             # DW_AT_linkage_name
121	.byte	37                              # DW_FORM_strx1
122	.byte	3                               # DW_AT_name
123	.byte	37                              # DW_FORM_strx1
124	.byte	58                              # DW_AT_decl_file
125	.byte	11                              # DW_FORM_data1
126	.byte	59                              # DW_AT_decl_line
127	.byte	11                              # DW_FORM_data1
128	.byte	73                              # DW_AT_type
129	.byte	19                              # DW_FORM_ref4
130	.byte	63                              # DW_AT_external
131	.byte	25                              # DW_FORM_flag_present
132	.byte	0                               # EOM(1)
133	.byte	0                               # EOM(2)
134	.byte	5                               # Abbreviation Code
135	.byte	52                              # DW_TAG_variable
136	.byte	0                               # DW_CHILDREN_no
137	.byte	2                               # DW_AT_location
138	.byte	24                              # DW_FORM_exprloc
139	.byte	3                               # DW_AT_name
140	.byte	37                              # DW_FORM_strx1
141	.byte	58                              # DW_AT_decl_file
142	.byte	11                              # DW_FORM_data1
143	.byte	59                              # DW_AT_decl_line
144	.byte	11                              # DW_FORM_data1
145	.byte	73                              # DW_AT_type
146	.byte	19                              # DW_FORM_ref4
147	.byte	0                               # EOM(1)
148	.byte	0                               # EOM(2)
149	.byte	6                               # Abbreviation Code
150	.byte	19                              # DW_TAG_structure_type
151	.byte	1                               # DW_CHILDREN_yes
152	.byte	54                              # DW_AT_calling_convention
153	.byte	11                              # DW_FORM_data1
154	.byte	3                               # DW_AT_name
155	.byte	37                              # DW_FORM_strx1
156	.byte	11                              # DW_AT_byte_size
157	.byte	11                              # DW_FORM_data1
158	.byte	58                              # DW_AT_decl_file
159	.byte	11                              # DW_FORM_data1
160	.byte	59                              # DW_AT_decl_line
161	.byte	11                              # DW_FORM_data1
162	.byte	0                               # EOM(1)
163	.byte	0                               # EOM(2)
164	.byte	7                               # Abbreviation Code
165	.byte	13                              # DW_TAG_member
166	.byte	0                               # DW_CHILDREN_no
167	.byte	3                               # DW_AT_name
168	.byte	37                              # DW_FORM_strx1
169	.byte	73                              # DW_AT_type
170	.byte	19                              # DW_FORM_ref4
171	.byte	58                              # DW_AT_decl_file
172	.byte	11                              # DW_FORM_data1
173	.byte	59                              # DW_AT_decl_line
174	.byte	11                              # DW_FORM_data1
175	.byte	56                              # DW_AT_data_member_location
176	.byte	11                              # DW_FORM_data1
177	.byte	0                               # EOM(1)
178	.byte	0                               # EOM(2)
179	.byte	8                               # Abbreviation Code
180	.byte	15                              # DW_TAG_pointer_type
181	.byte	0                               # DW_CHILDREN_no
182	.byte	73                              # DW_AT_type
183	.byte	19                              # DW_FORM_ref4
184	.byte	0                               # EOM(1)
185	.byte	0                               # EOM(2)
186	.byte	0                               # EOM(3)
187	.section	.debug_info,"",@progbits
188.Lcu_begin0:
189	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
190.Ldebug_info_start0:
191	.short	5                               # DWARF version number
192	.byte	1                               # DWARF Unit Type
193	.byte	8                               # Address Size (in bytes)
194	.long	.debug_abbrev                   # Offset Into Abbrev. Section
195	.byte	1                               # Abbrev [1] 0xc:0x97 DW_TAG_compile_unit
196	.byte	0                               # DW_AT_producer
197	.short	33                              # DW_AT_language
198	.byte	1                               # DW_AT_name
199	.long	.Lstr_offsets_base0             # DW_AT_str_offsets_base
200	.long	.Lline_table_start0             # DW_AT_stmt_list
201	.byte	2                               # DW_AT_comp_dir
202	.byte	1                               # DW_AT_low_pc
203	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
204	.long	.Laddr_table_base0              # DW_AT_addr_base
205	.byte	2                               # Abbrev [2] 0x23:0xb DW_TAG_variable
206	.byte	3                               # DW_AT_name
207	.long	46                              # DW_AT_type
208                                        # DW_AT_external
209	.byte	0                               # DW_AT_decl_file
210	.byte	2                               # DW_AT_decl_line
211	.byte	2                               # DW_AT_location
212	.byte	161
213	.byte	0
214	.byte	3                               # Abbrev [3] 0x2e:0x4 DW_TAG_base_type
215	.byte	4                               # DW_AT_name
216	.byte	5                               # DW_AT_encoding
217	.byte	4                               # DW_AT_byte_size
218	.byte	4                               # Abbrev [4] 0x32:0x27 DW_TAG_subprogram
219	.byte	1                               # DW_AT_low_pc
220	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
221	.byte	1                               # DW_AT_frame_base
222	.byte	86
223	.byte	5                               # DW_AT_linkage_name
224	.byte	6                               # DW_AT_name
225	.byte	0                               # DW_AT_decl_file
226	.byte	8                               # DW_AT_decl_line
227	.long	46                              # DW_AT_type
228                                        # DW_AT_external
229	.byte	5                               # Abbrev [5] 0x42:0xb DW_TAG_variable
230	.byte	2                               # DW_AT_location
231	.byte	145
232	.byte	112
233	.byte	7                               # DW_AT_name
234	.byte	0                               # DW_AT_decl_file
235	.byte	9                               # DW_AT_decl_line
236	.long	89                              # DW_AT_type
237	.byte	5                               # Abbrev [5] 0x4d:0xb DW_TAG_variable
238	.byte	2                               # DW_AT_location
239	.byte	145
240	.byte	88
241	.byte	11                              # DW_AT_name
242	.byte	0                               # DW_AT_decl_file
243	.byte	10                              # DW_AT_decl_line
244	.long	119                             # DW_AT_type
245	.byte	0                               # End Of Children Mark
246	.byte	6                               # Abbrev [6] 0x59:0x19 DW_TAG_structure_type
247	.byte	5                               # DW_AT_calling_convention
248	.byte	10                              # DW_AT_name
249	.byte	16                              # DW_AT_byte_size
250	.byte	0                               # DW_AT_decl_file
251	.byte	3                               # DW_AT_decl_line
252	.byte	7                               # Abbrev [7] 0x5f:0x9 DW_TAG_member
253	.byte	8                               # DW_AT_name
254	.long	114                             # DW_AT_type
255	.byte	0                               # DW_AT_decl_file
256	.byte	4                               # DW_AT_decl_line
257	.byte	0                               # DW_AT_data_member_location
258	.byte	7                               # Abbrev [7] 0x68:0x9 DW_TAG_member
259	.byte	9                               # DW_AT_name
260	.long	114                             # DW_AT_type
261	.byte	0                               # DW_AT_decl_file
262	.byte	5                               # DW_AT_decl_line
263	.byte	8                               # DW_AT_data_member_location
264	.byte	0                               # End Of Children Mark
265	.byte	8                               # Abbrev [8] 0x72:0x5 DW_TAG_pointer_type
266	.long	46                              # DW_AT_type
267	.byte	6                               # Abbrev [6] 0x77:0x22 DW_TAG_structure_type
268	.byte	5                               # DW_AT_calling_convention
269	.byte	14                              # DW_AT_name
270	.byte	24                              # DW_AT_byte_size
271	.byte	1                               # DW_AT_decl_file
272	.byte	1                               # DW_AT_decl_line
273	.byte	7                               # Abbrev [7] 0x7d:0x9 DW_TAG_member
274	.byte	8                               # DW_AT_name
275	.long	153                             # DW_AT_type
276	.byte	1                               # DW_AT_decl_file
277	.byte	2                               # DW_AT_decl_line
278	.byte	0                               # DW_AT_data_member_location
279	.byte	7                               # Abbrev [7] 0x86:0x9 DW_TAG_member
280	.byte	9                               # DW_AT_name
281	.long	153                             # DW_AT_type
282	.byte	1                               # DW_AT_decl_file
283	.byte	3                               # DW_AT_decl_line
284	.byte	8                               # DW_AT_data_member_location
285	.byte	7                               # Abbrev [7] 0x8f:0x9 DW_TAG_member
286	.byte	13                              # DW_AT_name
287	.long	153                             # DW_AT_type
288	.byte	1                               # DW_AT_decl_file
289	.byte	4                               # DW_AT_decl_line
290	.byte	16                              # DW_AT_data_member_location
291	.byte	0                               # End Of Children Mark
292	.byte	8                               # Abbrev [8] 0x99:0x5 DW_TAG_pointer_type
293	.long	158                             # DW_AT_type
294	.byte	3                               # Abbrev [3] 0x9e:0x4 DW_TAG_base_type
295	.byte	12                              # DW_AT_name
296	.byte	6                               # DW_AT_encoding
297	.byte	1                               # DW_AT_byte_size
298	.byte	0                               # End Of Children Mark
299.Ldebug_info_end0:
300	.section	.debug_str_offsets,"",@progbits
301	.long	64                              # Length of String Offsets Set
302	.short	5
303	.short	0
304.Lstr_offsets_base0:
305	.section	.debug_str,"MS",@progbits,1
306.Linfo_string0:
307	.asciz	"clang version 18.0.0git"       # string offset=0
308.Linfo_string1:
309	.asciz	"helper.cpp"                    # string offset=24
310.Linfo_string2:
311	.asciz	"/home/ayermolo/local/tasks/T138552329/typeDedup" # string offset=35
312.Linfo_string3:
313	.asciz	"fooint"                        # string offset=83
314.Linfo_string4:
315	.asciz	"int"                           # string offset=90
316.Linfo_string5:
317	.asciz	"foo"                           # string offset=94
318.Linfo_string6:
319	.asciz	"_Z3foov"                       # string offset=98
320.Linfo_string7:
321	.asciz	"fint"                          # string offset=106
322.Linfo_string8:
323	.asciz	"Foo2Int"                       # string offset=111
324.Linfo_string9:
325	.asciz	"c1"                            # string offset=119
326.Linfo_string10:
327	.asciz	"c2"                            # string offset=122
328.Linfo_string11:
329	.asciz	"f"                             # string offset=125
330.Linfo_string12:
331	.asciz	"Foo2a"                         # string offset=127
332.Linfo_string13:
333	.asciz	"char"                          # string offset=133
334.Linfo_string14:
335	.asciz	"c3"                            # string offset=138
336	.section	.debug_str_offsets,"",@progbits
337	.long	.Linfo_string0
338	.long	.Linfo_string1
339	.long	.Linfo_string2
340	.long	.Linfo_string3
341	.long	.Linfo_string4
342	.long	.Linfo_string6
343	.long	.Linfo_string5
344	.long	.Linfo_string7
345	.long	.Linfo_string9
346	.long	.Linfo_string10
347	.long	.Linfo_string8
348	.long	.Linfo_string11
349	.long	.Linfo_string13
350	.long	.Linfo_string14
351	.long	.Linfo_string12
352	.section	.debug_addr,"",@progbits
353	.long	.Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
354.Ldebug_addr_start0:
355	.short	5                               # DWARF version number
356	.byte	8                               # Address size
357	.byte	0                               # Segment selector size
358.Laddr_table_base0:
359	.quad	fooint
360	.quad	.Lfunc_begin0
361.Ldebug_addr_end0:
362	.section	.debug_names,"",@progbits
363	.long	.Lnames_end0-.Lnames_start0     # Header: unit length
364.Lnames_start0:
365	.short	5                               # Header: version
366	.short	0                               # Header: padding
367	.long	1                               # Header: compilation unit count
368	.long	0                               # Header: local type unit count
369	.long	0                               # Header: foreign type unit count
370	.long	7                               # Header: bucket count
371	.long	7                               # Header: name count
372	.long	.Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size
373	.long	8                               # Header: augmentation string size
374	.ascii	"LLVM0700"                      # Header: augmentation string
375	.long	.Lcu_begin0                     # Compilation unit 0
376	.long	1                               # Bucket 0
377	.long	0                               # Bucket 1
378	.long	2                               # Bucket 2
379	.long	3                               # Bucket 3
380	.long	0                               # Bucket 4
381	.long	5                               # Bucket 5
382	.long	7                               # Bucket 6
383	.long	-1257882357                     # Hash in Bucket 0
384	.long	-1168750522                     # Hash in Bucket 2
385	.long	193495088                       # Hash in Bucket 3
386	.long	259227804                       # Hash in Bucket 3
387	.long	193491849                       # Hash in Bucket 5
388	.long	2090147939                      # Hash in Bucket 5
389	.long	-35356620                       # Hash in Bucket 6
390	.long	.Linfo_string6                  # String in Bucket 0: _Z3foov
391	.long	.Linfo_string8                  # String in Bucket 2: Foo2Int
392	.long	.Linfo_string4                  # String in Bucket 3: int
393	.long	.Linfo_string12                 # String in Bucket 3: Foo2a
394	.long	.Linfo_string5                  # String in Bucket 5: foo
395	.long	.Linfo_string13                 # String in Bucket 5: char
396	.long	.Linfo_string3                  # String in Bucket 6: fooint
397	.long	.Lnames3-.Lnames_entries0       # Offset in Bucket 0
398	.long	.Lnames4-.Lnames_entries0       # Offset in Bucket 2
399	.long	.Lnames0-.Lnames_entries0       # Offset in Bucket 3
400	.long	.Lnames5-.Lnames_entries0       # Offset in Bucket 3
401	.long	.Lnames2-.Lnames_entries0       # Offset in Bucket 5
402	.long	.Lnames6-.Lnames_entries0       # Offset in Bucket 5
403	.long	.Lnames1-.Lnames_entries0       # Offset in Bucket 6
404.Lnames_abbrev_start0:
405	.ascii	"\230."                         # Abbrev code
406	.byte	46                              # DW_TAG_subprogram
407	.byte	3                               # DW_IDX_die_offset
408	.byte	19                              # DW_FORM_ref4
409	.byte	4                               # DW_IDX_parent
410	.byte	25                              # DW_FORM_flag_present
411	.byte	0                               # End of abbrev
412	.byte	0                               # End of abbrev
413	.ascii	"\230\023"                      # Abbrev code
414	.byte	19                              # DW_TAG_structure_type
415	.byte	3                               # DW_IDX_die_offset
416	.byte	19                              # DW_FORM_ref4
417	.byte	4                               # DW_IDX_parent
418	.byte	25                              # DW_FORM_flag_present
419	.byte	0                               # End of abbrev
420	.byte	0                               # End of abbrev
421	.ascii	"\230$"                         # Abbrev code
422	.byte	36                              # DW_TAG_base_type
423	.byte	3                               # DW_IDX_die_offset
424	.byte	19                              # DW_FORM_ref4
425	.byte	4                               # DW_IDX_parent
426	.byte	25                              # DW_FORM_flag_present
427	.byte	0                               # End of abbrev
428	.byte	0                               # End of abbrev
429	.ascii	"\2304"                         # Abbrev code
430	.byte	52                              # DW_TAG_variable
431	.byte	3                               # DW_IDX_die_offset
432	.byte	19                              # DW_FORM_ref4
433	.byte	4                               # DW_IDX_parent
434	.byte	25                              # DW_FORM_flag_present
435	.byte	0                               # End of abbrev
436	.byte	0                               # End of abbrev
437	.byte	0                               # End of abbrev list
438.Lnames_abbrev_end0:
439.Lnames_entries0:
440.Lnames3:
441.L0:
442	.ascii	"\230."                         # Abbreviation code
443	.long	50                              # DW_IDX_die_offset
444	.byte	0                               # DW_IDX_parent
445                                        # End of list: _Z3foov
446.Lnames4:
447.L5:
448	.ascii	"\230\023"                      # Abbreviation code
449	.long	89                              # DW_IDX_die_offset
450	.byte	0                               # DW_IDX_parent
451                                        # End of list: Foo2Int
452.Lnames0:
453.L2:
454	.ascii	"\230$"                         # Abbreviation code
455	.long	46                              # DW_IDX_die_offset
456	.byte	0                               # DW_IDX_parent
457                                        # End of list: int
458.Lnames5:
459.L3:
460	.ascii	"\230\023"                      # Abbreviation code
461	.long	119                             # DW_IDX_die_offset
462	.byte	0                               # DW_IDX_parent
463                                        # End of list: Foo2a
464.Lnames2:
465	.ascii	"\230."                         # Abbreviation code
466	.long	50                              # DW_IDX_die_offset
467	.byte	0                               # DW_IDX_parent
468                                        # End of list: foo
469.Lnames6:
470.L1:
471	.ascii	"\230$"                         # Abbreviation code
472	.long	158                             # DW_IDX_die_offset
473	.byte	0                               # DW_IDX_parent
474                                        # End of list: char
475.Lnames1:
476.L4:
477	.ascii	"\2304"                         # Abbreviation code
478	.long	35                              # DW_IDX_die_offset
479	.byte	0                               # DW_IDX_parent
480                                        # End of list: fooint
481	.p2align	2, 0x0
482.Lnames_end0:
483	.ident	"clang version 18.0.0git"
484	.section	".note.GNU-stack","",@progbits
485	.addrsig
486	.section	.debug_line,"",@progbits
487.Lline_table_start0:
488