xref: /llvm-project/bolt/test/X86/Inputs/dwarf5-types-debug-names-main.s (revision 6de5fcc74637116581d7b9b39c16fc252a5a54ef)
1# clang++ -g2 -gdwarf-5 -gpubnames -fdebug-types-section
2# header.h
3# struct Foo2a {
4#   char *c1;
5# };
6# main.cpp
7# #include "header.h"
8# int main() {
9#  Foo2a f3;
10#  return 0;
11# }
12
13	.text
14	.file	"main.cpp"
15	.globl	main                            # -- Begin function main
16	.p2align	4, 0x90
17	.type	main,@function
18main:                                   # @main
19.Lfunc_begin0:
20	.file	0 "/typeDedupSmall" "main.cpp" md5 0x6e787b94dac2f817bb35cfde8006dc82
21	.loc	0 2 0                           # main.cpp:2:0
22	.cfi_startproc
23# %bb.0:                                # %entry
24	pushq	%rbp
25	.cfi_def_cfa_offset 16
26	.cfi_offset %rbp, -16
27	movq	%rsp, %rbp
28	.cfi_def_cfa_register %rbp
29	movl	$0, -4(%rbp)
30.Ltmp0:
31	.loc	0 4 2 prologue_end              # main.cpp:4:2
32	xorl	%eax, %eax
33	.loc	0 4 2 epilogue_begin is_stmt 0  # main.cpp:4:2
34	popq	%rbp
35	.cfi_def_cfa %rsp, 8
36	retq
37.Ltmp1:
38.Lfunc_end0:
39	.size	main, .Lfunc_end0-main
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	8                               # 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	6                               # 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	7                               # 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	3                               # DW_AT_name
171	.byte	37                              # DW_FORM_strx1
172	.byte	58                              # DW_AT_decl_file
173	.byte	11                              # DW_FORM_data1
174	.byte	59                              # DW_AT_decl_line
175	.byte	11                              # DW_FORM_data1
176	.byte	73                              # DW_AT_type
177	.byte	19                              # DW_FORM_ref4
178	.byte	63                              # DW_AT_external
179	.byte	25                              # DW_FORM_flag_present
180	.byte	0                               # EOM(1)
181	.byte	0                               # EOM(2)
182	.byte	8                               # Abbreviation Code
183	.byte	52                              # DW_TAG_variable
184	.byte	0                               # DW_CHILDREN_no
185	.byte	2                               # DW_AT_location
186	.byte	24                              # DW_FORM_exprloc
187	.byte	3                               # DW_AT_name
188	.byte	37                              # DW_FORM_strx1
189	.byte	58                              # DW_AT_decl_file
190	.byte	11                              # DW_FORM_data1
191	.byte	59                              # DW_AT_decl_line
192	.byte	11                              # DW_FORM_data1
193	.byte	73                              # DW_AT_type
194	.byte	19                              # DW_FORM_ref4
195	.byte	0                               # EOM(1)
196	.byte	0                               # EOM(2)
197	.byte	9                               # Abbreviation Code
198	.byte	19                              # DW_TAG_structure_type
199	.byte	0                               # DW_CHILDREN_no
200	.byte	60                              # DW_AT_declaration
201	.byte	25                              # DW_FORM_flag_present
202	.byte	105                             # DW_AT_signature
203	.byte	32                              # DW_FORM_ref_sig8
204	.byte	0                               # EOM(1)
205	.byte	0                               # EOM(2)
206	.byte	0                               # EOM(3)
207	.section	.debug_info,"",@progbits
208.Lcu_begin0:
209	.long	.Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit
210.Ldebug_info_start1:
211	.short	5                               # DWARF version number
212	.byte	1                               # DWARF Unit Type
213	.byte	8                               # Address Size (in bytes)
214	.long	.debug_abbrev                   # Offset Into Abbrev. Section
215	.byte	6                               # Abbrev [6] 0xc:0x40 DW_TAG_compile_unit
216	.byte	0                               # DW_AT_producer
217	.short	33                              # DW_AT_language
218	.byte	1                               # DW_AT_name
219	.long	.Lstr_offsets_base0             # DW_AT_str_offsets_base
220	.long	.Lline_table_start0             # DW_AT_stmt_list
221	.byte	2                               # DW_AT_comp_dir
222	.byte	0                               # DW_AT_low_pc
223	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
224	.long	.Laddr_table_base0              # DW_AT_addr_base
225	.byte	7                               # Abbrev [7] 0x23:0x1b DW_TAG_subprogram
226	.byte	0                               # DW_AT_low_pc
227	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
228	.byte	1                               # DW_AT_frame_base
229	.byte	86
230	.byte	3                               # DW_AT_name
231	.byte	0                               # DW_AT_decl_file
232	.byte	2                               # DW_AT_decl_line
233	.long	62                              # DW_AT_type
234                                        # DW_AT_external
235	.byte	8                               # Abbrev [8] 0x32:0xb DW_TAG_variable
236	.byte	2                               # DW_AT_location
237	.byte	145
238	.byte	112
239	.byte	5                               # DW_AT_name
240	.byte	0                               # DW_AT_decl_file
241	.byte	3                               # DW_AT_decl_line
242	.long	66                              # DW_AT_type
243	.byte	0                               # End Of Children Mark
244	.byte	5                               # Abbrev [5] 0x3e:0x4 DW_TAG_base_type
245	.byte	4                               # DW_AT_name
246	.byte	5                               # DW_AT_encoding
247	.byte	4                               # DW_AT_byte_size
248	.byte	9                               # Abbrev [9] 0x42:0x9 DW_TAG_structure_type
249                                        # DW_AT_declaration
250	.quad	1175092228111723119             # DW_AT_signature
251	.byte	0                               # End Of Children Mark
252.Ldebug_info_end1:
253	.section	.debug_str_offsets,"",@progbits
254	.long	40                              # Length of String Offsets Set
255	.short	5
256	.short	0
257.Lstr_offsets_base0:
258	.section	.debug_str,"MS",@progbits,1
259.Linfo_string0:
260	.asciz	"clang version 18.0.0git (git@github.com:ayermolo/llvm-project.git db35fa8fc524127079662802c4735dbf397f86d0)" # string offset=0
261.Linfo_string1:
262	.asciz	"main.cpp"                      # string offset=108
263.Linfo_string2:
264	.asciz	"/home/typeDedupSmall" # string offset=117
265.Linfo_string3:
266	.asciz	"main"                          # string offset=170
267.Linfo_string4:
268	.asciz	"int"                           # string offset=175
269.Linfo_string5:
270	.asciz	"f3"                            # string offset=179
271.Linfo_string6:
272	.asciz	"Foo2a"                         # string offset=182
273.Linfo_string7:
274	.asciz	"c1"                            # string offset=188
275.Linfo_string8:
276	.asciz	"char"                          # string offset=191
277	.section	.debug_str_offsets,"",@progbits
278	.long	.Linfo_string0
279	.long	.Linfo_string1
280	.long	.Linfo_string2
281	.long	.Linfo_string3
282	.long	.Linfo_string4
283	.long	.Linfo_string5
284	.long	.Linfo_string7
285	.long	.Linfo_string8
286	.long	.Linfo_string6
287	.section	.debug_addr,"",@progbits
288	.long	.Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
289.Ldebug_addr_start0:
290	.short	5                               # DWARF version number
291	.byte	8                               # Address size
292	.byte	0                               # Segment selector size
293.Laddr_table_base0:
294	.quad	.Lfunc_begin0
295.Ldebug_addr_end0:
296	.section	.debug_names,"",@progbits
297	.long	.Lnames_end0-.Lnames_start0     # Header: unit length
298.Lnames_start0:
299	.short	5                               # Header: version
300	.short	0                               # Header: padding
301	.long	1                               # Header: compilation unit count
302	.long	1                               # Header: local type unit count
303	.long	0                               # Header: foreign type unit count
304	.long	4                               # Header: bucket count
305	.long	4                               # Header: name count
306	.long	.Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size
307	.long	8                               # Header: augmentation string size
308	.ascii	"LLVM0700"                      # Header: augmentation string
309	.long	.Lcu_begin0                     # Compilation unit 0
310	.long	.Ltu_begin0                     # Type unit 0
311	.long	1                               # Bucket 0
312	.long	0                               # Bucket 1
313	.long	3                               # Bucket 2
314	.long	4                               # Bucket 3
315	.long	193495088                       # Hash in Bucket 0
316	.long	259227804                       # Hash in Bucket 0
317	.long	2090499946                      # Hash in Bucket 2
318	.long	2090147939                      # Hash in Bucket 3
319	.long	.Linfo_string4                  # String in Bucket 0: int
320	.long	.Linfo_string6                  # String in Bucket 0: Foo2a
321	.long	.Linfo_string3                  # String in Bucket 2: main
322	.long	.Linfo_string8                  # String in Bucket 3: char
323	.long	.Lnames1-.Lnames_entries0       # Offset in Bucket 0
324	.long	.Lnames2-.Lnames_entries0       # Offset in Bucket 0
325	.long	.Lnames0-.Lnames_entries0       # Offset in Bucket 2
326	.long	.Lnames3-.Lnames_entries0       # Offset in Bucket 3
327.Lnames_abbrev_start0:
328	.ascii	"\350\004"                      # Abbrev code
329	.byte	19                              # DW_TAG_structure_type
330	.byte	3                               # DW_IDX_die_offset
331	.byte	19                              # DW_FORM_ref4
332	.byte	0                               # End of abbrev
333	.byte	0                               # End of abbrev
334	.ascii	"\354\004"                      # Abbrev code
335	.byte	19                              # DW_TAG_structure_type
336	.byte	2                               # DW_IDX_type_unit
337	.byte	11                              # DW_FORM_data1
338	.byte	3                               # DW_IDX_die_offset
339	.byte	19                              # DW_FORM_ref4
340	.byte	0                               # End of abbrev
341	.byte	0                               # End of abbrev
342	.ascii	"\210\t"                        # Abbrev code
343	.byte	36                              # DW_TAG_base_type
344	.byte	3                               # DW_IDX_die_offset
345	.byte	19                              # DW_FORM_ref4
346	.byte	0                               # End of abbrev
347	.byte	0                               # End of abbrev
348	.ascii	"\310\013"                      # Abbrev code
349	.byte	46                              # DW_TAG_subprogram
350	.byte	3                               # DW_IDX_die_offset
351	.byte	19                              # DW_FORM_ref4
352	.byte	0                               # End of abbrev
353	.byte	0                               # End of abbrev
354	.ascii	"\214\t"                        # Abbrev code
355	.byte	36                              # DW_TAG_base_type
356	.byte	2                               # DW_IDX_type_unit
357	.byte	11                              # DW_FORM_data1
358	.byte	3                               # DW_IDX_die_offset
359	.byte	19                              # DW_FORM_ref4
360	.byte	0                               # End of abbrev
361	.byte	0                               # End of abbrev
362	.byte	0                               # End of abbrev list
363.Lnames_abbrev_end0:
364.Lnames_entries0:
365.Lnames1:
366	.ascii	"\210\t"                        # Abbreviation code
367	.long	62                              # DW_IDX_die_offset
368	.byte	0                               # End of list: int
369.Lnames2:
370	.ascii	"\354\004"                      # Abbreviation code
371	.byte	0                               # DW_IDX_type_unit
372	.long	35                              # DW_IDX_die_offset
373	.ascii	"\350\004"                      # Abbreviation code
374	.long	66                              # DW_IDX_die_offset
375	.byte	0                               # End of list: Foo2a
376.Lnames0:
377	.ascii	"\310\013"                      # Abbreviation code
378	.long	35                              # DW_IDX_die_offset
379	.byte	0                               # End of list: main
380.Lnames3:
381	.ascii	"\214\t"                        # Abbreviation code
382	.byte	0                               # DW_IDX_type_unit
383	.long	56                              # DW_IDX_die_offset
384	.byte	0                               # End of list: char
385	.p2align	2, 0x0
386.Lnames_end0:
387	.ident	"clang version 18.0.0git (git@github.com:ayermolo/llvm-project.git db35fa8fc524127079662802c4735dbf397f86d0)"
388	.section	".note.GNU-stack","",@progbits
389	.addrsig
390	.section	.debug_line,"",@progbits
391.Lline_table_start0:
392