xref: /llvm-project/bolt/test/X86/Inputs/dwarf5-types-debug-names-helper.s (revision 6de5fcc74637116581d7b9b39c16fc252a5a54ef)
1# clang++ helper.cpp -g2 -gdwarf-5 -gpubnames -fdebug-types-section
2# header.h
3# struct Foo2a {
4#   char *c1;
5# };
6# helper.cpp
7# #include "header.h"
8# int foo() {
9#   Foo2a f;
10#   return 0;
11# }
12
13
14	.text
15	.file	"helper.cpp"
16	.globl	_Z3foov                         # -- Begin function _Z3foov
17	.p2align	4, 0x90
18	.type	_Z3foov,@function
19_Z3foov:                                # @_Z3foov
20.Lfunc_begin0:
21	.file	0 "/typeDedupSmall" "helper.cpp" md5 0x305ec66c221c583021f8375b300e2591
22	.loc	0 2 0                           # helper.cpp:2:0
23	.cfi_startproc
24# %bb.0:                                # %entry
25	pushq	%rbp
26	.cfi_def_cfa_offset 16
27	.cfi_offset %rbp, -16
28	movq	%rsp, %rbp
29	.cfi_def_cfa_register %rbp
30.Ltmp0:
31	.loc	0 4 3 prologue_end              # helper.cpp:4:3
32	xorl	%eax, %eax
33	.loc	0 4 3 epilogue_begin is_stmt 0  # helper.cpp:4:3
34	popq	%rbp
35	.cfi_def_cfa %rsp, 8
36	retq
37.Ltmp1:
38.Lfunc_end0:
39	.size	_Z3foov, .Lfunc_end0-_Z3foov
40	.cfi_endproc
41                                        # -- End function
42	.file	1 "." "header.h" md5 0x53699580704254cb1dd2a83230f8a7ea
43	.section	.debug_info,"G",@progbits,1175092228111723119,comdat
44.Ltu_begin0:
45	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
46.Ldebug_info_start0:
47	.short	5                               # DWARF version number
48	.byte	2                               # DWARF Unit Type
49	.byte	8                               # Address Size (in bytes)
50	.long	.debug_abbrev                   # Offset Into Abbrev. Section
51	.quad	1175092228111723119             # Type Signature
52	.long	35                              # Type DIE Offset
53	.byte	1                               # Abbrev [1] 0x18:0x25 DW_TAG_type_unit
54	.short	33                              # DW_AT_language
55	.long	.Lline_table_start0             # DW_AT_stmt_list
56	.long	.Lstr_offsets_base0             # DW_AT_str_offsets_base
57	.byte	2                               # Abbrev [2] 0x23:0x10 DW_TAG_structure_type
58	.byte	5                               # DW_AT_calling_convention
59	.byte	9                               # DW_AT_name
60	.byte	8                               # DW_AT_byte_size
61	.byte	1                               # DW_AT_decl_file
62	.byte	1                               # DW_AT_decl_line
63	.byte	3                               # Abbrev [3] 0x29:0x9 DW_TAG_member
64	.byte	7                               # DW_AT_name
65	.long	51                              # DW_AT_type
66	.byte	1                               # DW_AT_decl_file
67	.byte	2                               # DW_AT_decl_line
68	.byte	0                               # DW_AT_data_member_location
69	.byte	0                               # End Of Children Mark
70	.byte	4                               # Abbrev [4] 0x33:0x5 DW_TAG_pointer_type
71	.long	56                              # DW_AT_type
72	.byte	5                               # Abbrev [5] 0x38:0x4 DW_TAG_base_type
73	.byte	8                               # DW_AT_name
74	.byte	6                               # DW_AT_encoding
75	.byte	1                               # DW_AT_byte_size
76	.byte	0                               # End Of Children Mark
77.Ldebug_info_end0:
78	.section	.debug_abbrev,"",@progbits
79	.byte	1                               # Abbreviation Code
80	.byte	65                              # DW_TAG_type_unit
81	.byte	1                               # DW_CHILDREN_yes
82	.byte	19                              # DW_AT_language
83	.byte	5                               # DW_FORM_data2
84	.byte	16                              # DW_AT_stmt_list
85	.byte	23                              # DW_FORM_sec_offset
86	.byte	114                             # DW_AT_str_offsets_base
87	.byte	23                              # DW_FORM_sec_offset
88	.byte	0                               # EOM(1)
89	.byte	0                               # EOM(2)
90	.byte	2                               # Abbreviation Code
91	.byte	19                              # DW_TAG_structure_type
92	.byte	1                               # DW_CHILDREN_yes
93	.byte	54                              # DW_AT_calling_convention
94	.byte	11                              # DW_FORM_data1
95	.byte	3                               # DW_AT_name
96	.byte	37                              # DW_FORM_strx1
97	.byte	11                              # DW_AT_byte_size
98	.byte	11                              # DW_FORM_data1
99	.byte	58                              # DW_AT_decl_file
100	.byte	11                              # DW_FORM_data1
101	.byte	59                              # DW_AT_decl_line
102	.byte	11                              # DW_FORM_data1
103	.byte	0                               # EOM(1)
104	.byte	0                               # EOM(2)
105	.byte	3                               # Abbreviation Code
106	.byte	13                              # DW_TAG_member
107	.byte	0                               # DW_CHILDREN_no
108	.byte	3                               # DW_AT_name
109	.byte	37                              # DW_FORM_strx1
110	.byte	73                              # DW_AT_type
111	.byte	19                              # DW_FORM_ref4
112	.byte	58                              # DW_AT_decl_file
113	.byte	11                              # DW_FORM_data1
114	.byte	59                              # DW_AT_decl_line
115	.byte	11                              # DW_FORM_data1
116	.byte	56                              # DW_AT_data_member_location
117	.byte	11                              # DW_FORM_data1
118	.byte	0                               # EOM(1)
119	.byte	0                               # EOM(2)
120	.byte	4                               # Abbreviation Code
121	.byte	15                              # DW_TAG_pointer_type
122	.byte	0                               # DW_CHILDREN_no
123	.byte	73                              # DW_AT_type
124	.byte	19                              # DW_FORM_ref4
125	.byte	0                               # EOM(1)
126	.byte	0                               # EOM(2)
127	.byte	5                               # Abbreviation Code
128	.byte	36                              # DW_TAG_base_type
129	.byte	0                               # DW_CHILDREN_no
130	.byte	3                               # DW_AT_name
131	.byte	37                              # DW_FORM_strx1
132	.byte	62                              # DW_AT_encoding
133	.byte	11                              # DW_FORM_data1
134	.byte	11                              # DW_AT_byte_size
135	.byte	11                              # DW_FORM_data1
136	.byte	0                               # EOM(1)
137	.byte	0                               # EOM(2)
138	.byte	6                               # Abbreviation Code
139	.byte	17                              # DW_TAG_compile_unit
140	.byte	1                               # DW_CHILDREN_yes
141	.byte	37                              # DW_AT_producer
142	.byte	37                              # DW_FORM_strx1
143	.byte	19                              # DW_AT_language
144	.byte	5                               # DW_FORM_data2
145	.byte	3                               # DW_AT_name
146	.byte	37                              # DW_FORM_strx1
147	.byte	114                             # DW_AT_str_offsets_base
148	.byte	23                              # DW_FORM_sec_offset
149	.byte	16                              # DW_AT_stmt_list
150	.byte	23                              # DW_FORM_sec_offset
151	.byte	27                              # DW_AT_comp_dir
152	.byte	37                              # DW_FORM_strx1
153	.byte	17                              # DW_AT_low_pc
154	.byte	27                              # DW_FORM_addrx
155	.byte	18                              # DW_AT_high_pc
156	.byte	6                               # DW_FORM_data4
157	.byte	115                             # DW_AT_addr_base
158	.byte	23                              # DW_FORM_sec_offset
159	.byte	0                               # EOM(1)
160	.byte	0                               # EOM(2)
161	.byte	7                               # Abbreviation Code
162	.byte	46                              # DW_TAG_subprogram
163	.byte	1                               # DW_CHILDREN_yes
164	.byte	17                              # DW_AT_low_pc
165	.byte	27                              # DW_FORM_addrx
166	.byte	18                              # DW_AT_high_pc
167	.byte	6                               # DW_FORM_data4
168	.byte	64                              # DW_AT_frame_base
169	.byte	24                              # DW_FORM_exprloc
170	.byte	110                             # DW_AT_linkage_name
171	.byte	37                              # DW_FORM_strx1
172	.byte	3                               # DW_AT_name
173	.byte	37                              # DW_FORM_strx1
174	.byte	58                              # DW_AT_decl_file
175	.byte	11                              # DW_FORM_data1
176	.byte	59                              # DW_AT_decl_line
177	.byte	11                              # DW_FORM_data1
178	.byte	73                              # DW_AT_type
179	.byte	19                              # DW_FORM_ref4
180	.byte	63                              # DW_AT_external
181	.byte	25                              # DW_FORM_flag_present
182	.byte	0                               # EOM(1)
183	.byte	0                               # EOM(2)
184	.byte	8                               # Abbreviation Code
185	.byte	52                              # DW_TAG_variable
186	.byte	0                               # DW_CHILDREN_no
187	.byte	2                               # DW_AT_location
188	.byte	24                              # DW_FORM_exprloc
189	.byte	3                               # DW_AT_name
190	.byte	37                              # DW_FORM_strx1
191	.byte	58                              # DW_AT_decl_file
192	.byte	11                              # DW_FORM_data1
193	.byte	59                              # DW_AT_decl_line
194	.byte	11                              # DW_FORM_data1
195	.byte	73                              # DW_AT_type
196	.byte	19                              # DW_FORM_ref4
197	.byte	0                               # EOM(1)
198	.byte	0                               # EOM(2)
199	.byte	9                               # Abbreviation Code
200	.byte	19                              # DW_TAG_structure_type
201	.byte	0                               # DW_CHILDREN_no
202	.byte	60                              # DW_AT_declaration
203	.byte	25                              # DW_FORM_flag_present
204	.byte	105                             # DW_AT_signature
205	.byte	32                              # DW_FORM_ref_sig8
206	.byte	0                               # EOM(1)
207	.byte	0                               # EOM(2)
208	.byte	0                               # EOM(3)
209	.section	.debug_info,"",@progbits
210.Lcu_begin0:
211	.long	.Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit
212.Ldebug_info_start1:
213	.short	5                               # DWARF version number
214	.byte	1                               # DWARF Unit Type
215	.byte	8                               # Address Size (in bytes)
216	.long	.debug_abbrev                   # Offset Into Abbrev. Section
217	.byte	6                               # Abbrev [6] 0xc:0x41 DW_TAG_compile_unit
218	.byte	0                               # DW_AT_producer
219	.short	33                              # DW_AT_language
220	.byte	1                               # DW_AT_name
221	.long	.Lstr_offsets_base0             # DW_AT_str_offsets_base
222	.long	.Lline_table_start0             # DW_AT_stmt_list
223	.byte	2                               # DW_AT_comp_dir
224	.byte	0                               # DW_AT_low_pc
225	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
226	.long	.Laddr_table_base0              # DW_AT_addr_base
227	.byte	7                               # Abbrev [7] 0x23:0x1c DW_TAG_subprogram
228	.byte	0                               # DW_AT_low_pc
229	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
230	.byte	1                               # DW_AT_frame_base
231	.byte	86
232	.byte	3                               # DW_AT_linkage_name
233	.byte	4                               # DW_AT_name
234	.byte	0                               # DW_AT_decl_file
235	.byte	2                               # DW_AT_decl_line
236	.long	63                              # DW_AT_type
237                                        # DW_AT_external
238	.byte	8                               # Abbrev [8] 0x33:0xb DW_TAG_variable
239	.byte	2                               # DW_AT_location
240	.byte	145
241	.byte	120
242	.byte	6                               # DW_AT_name
243	.byte	0                               # DW_AT_decl_file
244	.byte	3                               # DW_AT_decl_line
245	.long	67                              # DW_AT_type
246	.byte	0                               # End Of Children Mark
247	.byte	5                               # Abbrev [5] 0x3f:0x4 DW_TAG_base_type
248	.byte	5                               # DW_AT_name
249	.byte	5                               # DW_AT_encoding
250	.byte	4                               # DW_AT_byte_size
251	.byte	9                               # Abbrev [9] 0x43:0x9 DW_TAG_structure_type
252                                        # DW_AT_declaration
253	.quad	1175092228111723119             # DW_AT_signature
254	.byte	0                               # End Of Children Mark
255.Ldebug_info_end1:
256	.section	.debug_str_offsets,"",@progbits
257	.long	44                              # Length of String Offsets Set
258	.short	5
259	.short	0
260.Lstr_offsets_base0:
261	.section	.debug_str,"MS",@progbits,1
262.Linfo_string0:
263	.asciz	"clang version 18.0.0git (git@github.com:ayermolo/llvm-project.git db35fa8fc524127079662802c4735dbf397f86d0)" # string offset=0
264.Linfo_string1:
265	.asciz	"helper.cpp"                    # string offset=108
266.Linfo_string2:
267	.asciz	"/home/typeDedupSmall" # string offset=119
268.Linfo_string3:
269	.asciz	"foo"                           # string offset=172
270.Linfo_string4:
271	.asciz	"_Z3foov"                       # string offset=176
272.Linfo_string5:
273	.asciz	"int"                           # string offset=184
274.Linfo_string6:
275	.asciz	"f"                             # string offset=188
276.Linfo_string7:
277	.asciz	"Foo2a"                         # string offset=190
278.Linfo_string8:
279	.asciz	"c1"                            # string offset=196
280.Linfo_string9:
281	.asciz	"char"                          # string offset=199
282	.section	.debug_str_offsets,"",@progbits
283	.long	.Linfo_string0
284	.long	.Linfo_string1
285	.long	.Linfo_string2
286	.long	.Linfo_string4
287	.long	.Linfo_string3
288	.long	.Linfo_string5
289	.long	.Linfo_string6
290	.long	.Linfo_string8
291	.long	.Linfo_string9
292	.long	.Linfo_string7
293	.section	.debug_addr,"",@progbits
294	.long	.Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
295.Ldebug_addr_start0:
296	.short	5                               # DWARF version number
297	.byte	8                               # Address size
298	.byte	0                               # Segment selector size
299.Laddr_table_base0:
300	.quad	.Lfunc_begin0
301.Ldebug_addr_end0:
302	.section	.debug_names,"",@progbits
303	.long	.Lnames_end0-.Lnames_start0     # Header: unit length
304.Lnames_start0:
305	.short	5                               # Header: version
306	.short	0                               # Header: padding
307	.long	1                               # Header: compilation unit count
308	.long	1                               # Header: local type unit count
309	.long	0                               # Header: foreign type unit count
310	.long	5                               # Header: bucket count
311	.long	5                               # Header: name count
312	.long	.Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size
313	.long	8                               # Header: augmentation string size
314	.ascii	"LLVM0700"                      # Header: augmentation string
315	.long	.Lcu_begin0                     # Compilation unit 0
316	.long	.Ltu_begin0                     # Type unit 0
317	.long	0                               # Bucket 0
318	.long	0                               # Bucket 1
319	.long	0                               # Bucket 2
320	.long	1                               # Bucket 3
321	.long	2                               # Bucket 4
322	.long	193495088                       # Hash in Bucket 3
323	.long	193491849                       # Hash in Bucket 4
324	.long	259227804                       # Hash in Bucket 4
325	.long	2090147939                      # Hash in Bucket 4
326	.long	-1257882357                     # Hash in Bucket 4
327	.long	.Linfo_string5                  # String in Bucket 3: int
328	.long	.Linfo_string3                  # String in Bucket 4: foo
329	.long	.Linfo_string7                  # String in Bucket 4: Foo2a
330	.long	.Linfo_string9                  # String in Bucket 4: char
331	.long	.Linfo_string4                  # String in Bucket 4: _Z3foov
332	.long	.Lnames2-.Lnames_entries0       # Offset in Bucket 3
333	.long	.Lnames0-.Lnames_entries0       # Offset in Bucket 4
334	.long	.Lnames3-.Lnames_entries0       # Offset in Bucket 4
335	.long	.Lnames4-.Lnames_entries0       # Offset in Bucket 4
336	.long	.Lnames1-.Lnames_entries0       # Offset in Bucket 4
337.Lnames_abbrev_start0:
338	.ascii	"\350\004"                      # Abbrev code
339	.byte	19                              # DW_TAG_structure_type
340	.byte	3                               # DW_IDX_die_offset
341	.byte	19                              # DW_FORM_ref4
342	.byte	0                               # End of abbrev
343	.byte	0                               # End of abbrev
344	.ascii	"\354\004"                      # Abbrev code
345	.byte	19                              # DW_TAG_structure_type
346	.byte	2                               # DW_IDX_type_unit
347	.byte	11                              # DW_FORM_data1
348	.byte	3                               # DW_IDX_die_offset
349	.byte	19                              # DW_FORM_ref4
350	.byte	0                               # End of abbrev
351	.byte	0                               # End of abbrev
352	.ascii	"\210\t"                        # Abbrev code
353	.byte	36                              # DW_TAG_base_type
354	.byte	3                               # DW_IDX_die_offset
355	.byte	19                              # DW_FORM_ref4
356	.byte	0                               # End of abbrev
357	.byte	0                               # End of abbrev
358	.ascii	"\310\013"                      # Abbrev code
359	.byte	46                              # DW_TAG_subprogram
360	.byte	3                               # DW_IDX_die_offset
361	.byte	19                              # DW_FORM_ref4
362	.byte	0                               # End of abbrev
363	.byte	0                               # End of abbrev
364	.ascii	"\214\t"                        # Abbrev code
365	.byte	36                              # DW_TAG_base_type
366	.byte	2                               # DW_IDX_type_unit
367	.byte	11                              # DW_FORM_data1
368	.byte	3                               # DW_IDX_die_offset
369	.byte	19                              # DW_FORM_ref4
370	.byte	0                               # End of abbrev
371	.byte	0                               # End of abbrev
372	.byte	0                               # End of abbrev list
373.Lnames_abbrev_end0:
374.Lnames_entries0:
375.Lnames2:
376	.ascii	"\210\t"                        # Abbreviation code
377	.long	63                              # DW_IDX_die_offset
378	.byte	0                               # End of list: int
379.Lnames0:
380	.ascii	"\310\013"                      # Abbreviation code
381	.long	35                              # DW_IDX_die_offset
382	.byte	0                               # End of list: foo
383.Lnames3:
384	.ascii	"\354\004"                      # Abbreviation code
385	.byte	0                               # DW_IDX_type_unit
386	.long	35                              # DW_IDX_die_offset
387	.ascii	"\350\004"                      # Abbreviation code
388	.long	67                              # DW_IDX_die_offset
389	.byte	0                               # End of list: Foo2a
390.Lnames4:
391	.ascii	"\214\t"                        # Abbreviation code
392	.byte	0                               # DW_IDX_type_unit
393	.long	56                              # DW_IDX_die_offset
394	.byte	0                               # End of list: char
395.Lnames1:
396	.ascii	"\310\013"                      # Abbreviation code
397	.long	35                              # DW_IDX_die_offset
398	.byte	0                               # End of list: _Z3foov
399	.p2align	2, 0x0
400.Lnames_end0:
401	.ident	"clang version 18.0.0git (git@github.com:ayermolo/llvm-project.git db35fa8fc524127079662802c4735dbf397f86d0)"
402	.section	".note.GNU-stack","",@progbits
403	.addrsig
404	.section	.debug_line,"",@progbits
405.Lline_table_start0:
406