xref: /llvm-project/bolt/test/X86/Inputs/dwarf4-split-gdb-index-types-helper.s (revision c33536e9c3068ae45f34f6e1c562d51cb8aa702a)
1# struct Foo2a {
2#   char *c1;
3#   char *c2;
4#   char *c3;
5# };
6# struct Foo3 {
7#   char *c1;
8#   char *c2;
9# };
10#
11# int foo() {
12#   Foo2a f;
13#   Foo3 f2;
14#   return 0;
15# }
16	.text
17	.file	"helper.cpp"
18	.globl	_Z3foov                         # -- Begin function _Z3foov
19	.p2align	4, 0x90
20	.type	_Z3foov,@function
21_Z3foov:                                # @_Z3foov
22.Lfunc_begin0:
23	.file	1 "." "helper.cpp"
24	.loc	1 11 0                          # helper.cpp:11:0
25	.cfi_startproc
26# %bb.0:
27	pushq	%rbp
28	.cfi_def_cfa_offset 16
29	.cfi_offset %rbp, -16
30	movq	%rsp, %rbp
31	.cfi_def_cfa_register %rbp
32.Ltmp0:
33	.loc	1 14 3 prologue_end             # helper.cpp:14:3
34	xorl	%eax, %eax
35	.loc	1 14 3 epilogue_begin is_stmt 0 # helper.cpp:14:3
36	popq	%rbp
37	.cfi_def_cfa %rsp, 8
38	retq
39.Ltmp1:
40.Lfunc_end0:
41	.size	_Z3foov, .Lfunc_end0-_Z3foov
42	.cfi_endproc
43                                        # -- End function
44	.section	.debug_types.dwo,"e",@progbits
45	.long	.Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
46.Ldebug_info_dwo_start0:
47	.short	4                               # DWARF version number
48	.long	0                               # Offset Into Abbrev. Section
49	.byte	8                               # Address Size (in bytes)
50	.quad	1175092228111723119             # Type Signature
51	.long	30                              # Type DIE Offset
52	.byte	1                               # Abbrev [1] 0x17:0x33 DW_TAG_type_unit
53	.short	33                              # DW_AT_language
54	.long	0                               # DW_AT_stmt_list
55	.byte	2                               # Abbrev [2] 0x1e:0x22 DW_TAG_structure_type
56	.byte	5                               # DW_AT_calling_convention
57	.byte	8                               # DW_AT_name
58	.byte	24                              # DW_AT_byte_size
59	.byte	1                               # DW_AT_decl_file
60	.byte	1                               # DW_AT_decl_line
61	.byte	3                               # Abbrev [3] 0x24:0x9 DW_TAG_member
62	.byte	4                               # DW_AT_name
63	.long	64                              # DW_AT_type
64	.byte	1                               # DW_AT_decl_file
65	.byte	2                               # DW_AT_decl_line
66	.byte	0                               # DW_AT_data_member_location
67	.byte	3                               # Abbrev [3] 0x2d:0x9 DW_TAG_member
68	.byte	6                               # DW_AT_name
69	.long	64                              # DW_AT_type
70	.byte	1                               # DW_AT_decl_file
71	.byte	3                               # DW_AT_decl_line
72	.byte	8                               # DW_AT_data_member_location
73	.byte	3                               # Abbrev [3] 0x36:0x9 DW_TAG_member
74	.byte	7                               # DW_AT_name
75	.long	64                              # DW_AT_type
76	.byte	1                               # DW_AT_decl_file
77	.byte	4                               # DW_AT_decl_line
78	.byte	16                              # DW_AT_data_member_location
79	.byte	0                               # End Of Children Mark
80	.byte	4                               # Abbrev [4] 0x40:0x5 DW_TAG_pointer_type
81	.long	69                              # DW_AT_type
82	.byte	5                               # Abbrev [5] 0x45:0x4 DW_TAG_base_type
83	.byte	5                               # DW_AT_name
84	.byte	6                               # DW_AT_encoding
85	.byte	1                               # DW_AT_byte_size
86	.byte	0                               # End Of Children Mark
87.Ldebug_info_dwo_end0:
88	.long	.Ldebug_info_dwo_end1-.Ldebug_info_dwo_start1 # Length of Unit
89.Ldebug_info_dwo_start1:
90	.short	4                               # DWARF version number
91	.long	0                               # Offset Into Abbrev. Section
92	.byte	8                               # Address Size (in bytes)
93	.quad	-5451594423976726044            # Type Signature
94	.long	30                              # Type DIE Offset
95	.byte	1                               # Abbrev [1] 0x17:0x2a DW_TAG_type_unit
96	.short	33                              # DW_AT_language
97	.long	0                               # DW_AT_stmt_list
98	.byte	2                               # Abbrev [2] 0x1e:0x19 DW_TAG_structure_type
99	.byte	5                               # DW_AT_calling_convention
100	.byte	10                              # DW_AT_name
101	.byte	16                              # DW_AT_byte_size
102	.byte	1                               # DW_AT_decl_file
103	.byte	6                               # DW_AT_decl_line
104	.byte	3                               # Abbrev [3] 0x24:0x9 DW_TAG_member
105	.byte	4                               # DW_AT_name
106	.long	55                              # DW_AT_type
107	.byte	1                               # DW_AT_decl_file
108	.byte	7                               # DW_AT_decl_line
109	.byte	0                               # DW_AT_data_member_location
110	.byte	3                               # Abbrev [3] 0x2d:0x9 DW_TAG_member
111	.byte	6                               # DW_AT_name
112	.long	55                              # DW_AT_type
113	.byte	1                               # DW_AT_decl_file
114	.byte	8                               # DW_AT_decl_line
115	.byte	8                               # DW_AT_data_member_location
116	.byte	0                               # End Of Children Mark
117	.byte	4                               # Abbrev [4] 0x37:0x5 DW_TAG_pointer_type
118	.long	60                              # DW_AT_type
119	.byte	5                               # Abbrev [5] 0x3c:0x4 DW_TAG_base_type
120	.byte	5                               # DW_AT_name
121	.byte	6                               # DW_AT_encoding
122	.byte	1                               # DW_AT_byte_size
123	.byte	0                               # End Of Children Mark
124.Ldebug_info_dwo_end1:
125	.section	.debug_abbrev,"",@progbits
126	.byte	1                               # Abbreviation Code
127	.byte	17                              # DW_TAG_compile_unit
128	.byte	0                               # DW_CHILDREN_no
129	.byte	16                              # DW_AT_stmt_list
130	.byte	23                              # DW_FORM_sec_offset
131	.byte	27                              # DW_AT_comp_dir
132	.byte	14                              # DW_FORM_strp
133	.ascii	"\264B"                         # DW_AT_GNU_pubnames
134	.byte	25                              # DW_FORM_flag_present
135	.ascii	"\260B"                         # DW_AT_GNU_dwo_name
136	.byte	14                              # DW_FORM_strp
137	.ascii	"\261B"                         # DW_AT_GNU_dwo_id
138	.byte	7                               # DW_FORM_data8
139	.byte	17                              # DW_AT_low_pc
140	.byte	1                               # DW_FORM_addr
141	.byte	18                              # DW_AT_high_pc
142	.byte	6                               # DW_FORM_data4
143	.ascii	"\263B"                         # DW_AT_GNU_addr_base
144	.byte	23                              # DW_FORM_sec_offset
145	.byte	0                               # EOM(1)
146	.byte	0                               # EOM(2)
147	.byte	0                               # EOM(3)
148	.section	.debug_info,"",@progbits
149.Lcu_begin0:
150	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
151.Ldebug_info_start0:
152	.short	4                               # DWARF version number
153	.long	.debug_abbrev                   # Offset Into Abbrev. Section
154	.byte	8                               # Address Size (in bytes)
155	.byte	1                               # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit
156	.long	.Lline_table_start0             # DW_AT_stmt_list
157	.long	.Lskel_string0                  # DW_AT_comp_dir
158                                        # DW_AT_GNU_pubnames
159	.long	.Lskel_string1                  # DW_AT_GNU_dwo_name
160	.quad	8590827077411666803             # DW_AT_GNU_dwo_id
161	.quad	.Lfunc_begin0                   # DW_AT_low_pc
162	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
163	.long	.Laddr_table_base0              # DW_AT_GNU_addr_base
164.Ldebug_info_end0:
165	.section	.debug_str,"MS",@progbits,1
166.Lskel_string0:
167	.asciz	"." # string offset=0
168.Lskel_string1:
169	.asciz	"helper.dwo"                    # string offset=68
170	.section	.debug_str.dwo,"eMS",@progbits,1
171.Linfo_string0:
172	.asciz	"_Z3foov"                       # string offset=0
173.Linfo_string1:
174	.asciz	"foo"                           # string offset=8
175.Linfo_string2:
176	.asciz	"int"                           # string offset=12
177.Linfo_string3:
178	.asciz	"f"                             # string offset=16
179.Linfo_string4:
180	.asciz	"c1"                            # string offset=18
181.Linfo_string5:
182	.asciz	"char"                          # string offset=21
183.Linfo_string6:
184	.asciz	"c2"                            # string offset=26
185.Linfo_string7:
186	.asciz	"c3"                            # string offset=29
187.Linfo_string8:
188	.asciz	"Foo2a"                         # string offset=32
189.Linfo_string9:
190	.asciz	"f2"                            # string offset=38
191.Linfo_string10:
192	.asciz	"Foo3"                          # string offset=41
193.Linfo_string11:
194	.asciz	"clang version 15.0.0" # string offset=46
195.Linfo_string12:
196	.asciz	"helper.cpp"                    # string offset=192
197.Linfo_string13:
198	.asciz	"helper.dwo"                    # string offset=203
199	.section	.debug_str_offsets.dwo,"e",@progbits
200	.long	0
201	.long	8
202	.long	12
203	.long	16
204	.long	18
205	.long	21
206	.long	26
207	.long	29
208	.long	32
209	.long	38
210	.long	41
211	.long	46
212	.long	192
213	.long	203
214	.section	.debug_info.dwo,"e",@progbits
215	.long	.Ldebug_info_dwo_end2-.Ldebug_info_dwo_start2 # Length of Unit
216.Ldebug_info_dwo_start2:
217	.short	4                               # DWARF version number
218	.long	0                               # Offset Into Abbrev. Section
219	.byte	8                               # Address Size (in bytes)
220	.byte	6                               # Abbrev [6] 0xb:0x4c DW_TAG_compile_unit
221	.byte	11                              # DW_AT_producer
222	.short	33                              # DW_AT_language
223	.byte	12                              # DW_AT_name
224	.byte	13                              # DW_AT_GNU_dwo_name
225	.quad	8590827077411666803             # DW_AT_GNU_dwo_id
226	.byte	7                               # Abbrev [7] 0x19:0x27 DW_TAG_subprogram
227	.byte	0                               # DW_AT_low_pc
228	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
229	.byte	1                               # DW_AT_frame_base
230	.byte	86
231	.byte	0                               # DW_AT_linkage_name
232	.byte	1                               # DW_AT_name
233	.byte	1                               # DW_AT_decl_file
234	.byte	11                              # DW_AT_decl_line
235	.long	64                              # DW_AT_type
236                                        # DW_AT_external
237	.byte	8                               # Abbrev [8] 0x29:0xb DW_TAG_variable
238	.byte	2                               # DW_AT_location
239	.byte	145
240	.byte	104
241	.byte	3                               # DW_AT_name
242	.byte	1                               # DW_AT_decl_file
243	.byte	12                              # DW_AT_decl_line
244	.long	68                              # DW_AT_type
245	.byte	8                               # Abbrev [8] 0x34:0xb DW_TAG_variable
246	.byte	2                               # DW_AT_location
247	.byte	145
248	.byte	88
249	.byte	9                               # DW_AT_name
250	.byte	1                               # DW_AT_decl_file
251	.byte	13                              # DW_AT_decl_line
252	.long	77                              # DW_AT_type
253	.byte	0                               # End Of Children Mark
254	.byte	5                               # Abbrev [5] 0x40:0x4 DW_TAG_base_type
255	.byte	2                               # DW_AT_name
256	.byte	5                               # DW_AT_encoding
257	.byte	4                               # DW_AT_byte_size
258	.byte	9                               # Abbrev [9] 0x44:0x9 DW_TAG_structure_type
259                                        # DW_AT_declaration
260	.quad	1175092228111723119             # DW_AT_signature
261	.byte	9                               # Abbrev [9] 0x4d:0x9 DW_TAG_structure_type
262                                        # DW_AT_declaration
263	.quad	-5451594423976726044            # DW_AT_signature
264	.byte	0                               # End Of Children Mark
265.Ldebug_info_dwo_end2:
266	.section	.debug_abbrev.dwo,"e",@progbits
267	.byte	1                               # Abbreviation Code
268	.byte	65                              # DW_TAG_type_unit
269	.byte	1                               # DW_CHILDREN_yes
270	.byte	19                              # DW_AT_language
271	.byte	5                               # DW_FORM_data2
272	.byte	16                              # DW_AT_stmt_list
273	.byte	23                              # DW_FORM_sec_offset
274	.byte	0                               # EOM(1)
275	.byte	0                               # EOM(2)
276	.byte	2                               # Abbreviation Code
277	.byte	19                              # DW_TAG_structure_type
278	.byte	1                               # DW_CHILDREN_yes
279	.byte	54                              # DW_AT_calling_convention
280	.byte	11                              # DW_FORM_data1
281	.byte	3                               # DW_AT_name
282	.ascii	"\202>"                         # DW_FORM_GNU_str_index
283	.byte	11                              # DW_AT_byte_size
284	.byte	11                              # DW_FORM_data1
285	.byte	58                              # DW_AT_decl_file
286	.byte	11                              # DW_FORM_data1
287	.byte	59                              # DW_AT_decl_line
288	.byte	11                              # DW_FORM_data1
289	.byte	0                               # EOM(1)
290	.byte	0                               # EOM(2)
291	.byte	3                               # Abbreviation Code
292	.byte	13                              # DW_TAG_member
293	.byte	0                               # DW_CHILDREN_no
294	.byte	3                               # DW_AT_name
295	.ascii	"\202>"                         # DW_FORM_GNU_str_index
296	.byte	73                              # DW_AT_type
297	.byte	19                              # DW_FORM_ref4
298	.byte	58                              # DW_AT_decl_file
299	.byte	11                              # DW_FORM_data1
300	.byte	59                              # DW_AT_decl_line
301	.byte	11                              # DW_FORM_data1
302	.byte	56                              # DW_AT_data_member_location
303	.byte	11                              # DW_FORM_data1
304	.byte	0                               # EOM(1)
305	.byte	0                               # EOM(2)
306	.byte	4                               # Abbreviation Code
307	.byte	15                              # DW_TAG_pointer_type
308	.byte	0                               # DW_CHILDREN_no
309	.byte	73                              # DW_AT_type
310	.byte	19                              # DW_FORM_ref4
311	.byte	0                               # EOM(1)
312	.byte	0                               # EOM(2)
313	.byte	5                               # Abbreviation Code
314	.byte	36                              # DW_TAG_base_type
315	.byte	0                               # DW_CHILDREN_no
316	.byte	3                               # DW_AT_name
317	.ascii	"\202>"                         # DW_FORM_GNU_str_index
318	.byte	62                              # DW_AT_encoding
319	.byte	11                              # DW_FORM_data1
320	.byte	11                              # DW_AT_byte_size
321	.byte	11                              # DW_FORM_data1
322	.byte	0                               # EOM(1)
323	.byte	0                               # EOM(2)
324	.byte	6                               # Abbreviation Code
325	.byte	17                              # DW_TAG_compile_unit
326	.byte	1                               # DW_CHILDREN_yes
327	.byte	37                              # DW_AT_producer
328	.ascii	"\202>"                         # DW_FORM_GNU_str_index
329	.byte	19                              # DW_AT_language
330	.byte	5                               # DW_FORM_data2
331	.byte	3                               # DW_AT_name
332	.ascii	"\202>"                         # DW_FORM_GNU_str_index
333	.ascii	"\260B"                         # DW_AT_GNU_dwo_name
334	.ascii	"\202>"                         # DW_FORM_GNU_str_index
335	.ascii	"\261B"                         # DW_AT_GNU_dwo_id
336	.byte	7                               # DW_FORM_data8
337	.byte	0                               # EOM(1)
338	.byte	0                               # EOM(2)
339	.byte	7                               # Abbreviation Code
340	.byte	46                              # DW_TAG_subprogram
341	.byte	1                               # DW_CHILDREN_yes
342	.byte	17                              # DW_AT_low_pc
343	.ascii	"\201>"                         # DW_FORM_GNU_addr_index
344	.byte	18                              # DW_AT_high_pc
345	.byte	6                               # DW_FORM_data4
346	.byte	64                              # DW_AT_frame_base
347	.byte	24                              # DW_FORM_exprloc
348	.byte	110                             # DW_AT_linkage_name
349	.ascii	"\202>"                         # DW_FORM_GNU_str_index
350	.byte	3                               # DW_AT_name
351	.ascii	"\202>"                         # DW_FORM_GNU_str_index
352	.byte	58                              # DW_AT_decl_file
353	.byte	11                              # DW_FORM_data1
354	.byte	59                              # DW_AT_decl_line
355	.byte	11                              # DW_FORM_data1
356	.byte	73                              # DW_AT_type
357	.byte	19                              # DW_FORM_ref4
358	.byte	63                              # DW_AT_external
359	.byte	25                              # DW_FORM_flag_present
360	.byte	0                               # EOM(1)
361	.byte	0                               # EOM(2)
362	.byte	8                               # Abbreviation Code
363	.byte	52                              # DW_TAG_variable
364	.byte	0                               # DW_CHILDREN_no
365	.byte	2                               # DW_AT_location
366	.byte	24                              # DW_FORM_exprloc
367	.byte	3                               # DW_AT_name
368	.ascii	"\202>"                         # DW_FORM_GNU_str_index
369	.byte	58                              # DW_AT_decl_file
370	.byte	11                              # DW_FORM_data1
371	.byte	59                              # DW_AT_decl_line
372	.byte	11                              # DW_FORM_data1
373	.byte	73                              # DW_AT_type
374	.byte	19                              # DW_FORM_ref4
375	.byte	0                               # EOM(1)
376	.byte	0                               # EOM(2)
377	.byte	9                               # Abbreviation Code
378	.byte	19                              # DW_TAG_structure_type
379	.byte	0                               # DW_CHILDREN_no
380	.byte	60                              # DW_AT_declaration
381	.byte	25                              # DW_FORM_flag_present
382	.byte	105                             # DW_AT_signature
383	.byte	32                              # DW_FORM_ref_sig8
384	.byte	0                               # EOM(1)
385	.byte	0                               # EOM(2)
386	.byte	0                               # EOM(3)
387	.section	.debug_line.dwo,"e",@progbits
388.Ltmp2:
389	.long	.Ldebug_line_end0-.Ldebug_line_start0 # unit length
390.Ldebug_line_start0:
391	.short	4
392	.long	.Lprologue_end0-.Lprologue_start0
393.Lprologue_start0:
394	.byte	1
395	.byte	1
396	.byte	1
397	.byte	-5
398	.byte	14
399	.byte	1
400	.byte	0
401	.ascii	"helper.cpp"
402	.byte	0
403	.byte	0
404	.byte	0
405	.byte	0
406	.byte	0
407.Lprologue_end0:
408.Ldebug_line_end0:
409	.section	.debug_addr,"",@progbits
410.Laddr_table_base0:
411	.quad	.Lfunc_begin0
412	.section	.debug_gnu_pubnames,"",@progbits
413	.long	.LpubNames_end0-.LpubNames_start0 # Length of Public Names Info
414.LpubNames_start0:
415	.short	2                               # DWARF Version
416	.long	.Lcu_begin0                     # Offset of Compilation Unit Info
417	.long	48                              # Compilation Unit Length
418	.long	25                              # DIE offset
419	.byte	48                              # Attributes: FUNCTION, EXTERNAL
420	.asciz	"foo"                           # External Name
421	.long	0                               # End Mark
422.LpubNames_end0:
423	.section	.debug_gnu_pubtypes,"",@progbits
424	.long	.LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info
425.LpubTypes_start0:
426	.short	2                               # DWARF Version
427	.long	.Lcu_begin0                     # Offset of Compilation Unit Info
428	.long	48                              # Compilation Unit Length
429	.long	68                              # DIE offset
430	.byte	16                              # Attributes: TYPE, EXTERNAL
431	.asciz	"Foo2a"                         # External Name
432	.long	64                              # DIE offset
433	.byte	144                             # Attributes: TYPE, STATIC
434	.asciz	"int"                           # External Name
435	.long	11                              # DIE offset
436	.byte	16                              # Attributes: TYPE, EXTERNAL
437	.asciz	"char"                          # External Name
438	.long	77                              # DIE offset
439	.byte	16                              # Attributes: TYPE, EXTERNAL
440	.asciz	"Foo3"                          # External Name
441	.long	0                               # End Mark
442.LpubTypes_end0:
443	.ident	"clang version 15.0.0"
444	.section	".note.GNU-stack","",@progbits
445	.addrsig
446	.section	.debug_line,"",@progbits
447.Lline_table_start0:
448