xref: /llvm-project/bolt/test/X86/Inputs/dwarf4-gdb-index-types-main.s (revision c33536e9c3068ae45f34f6e1c562d51cb8aa702a)
1# clang++ main.cpp   -ggnu-pubnames -g2 -gdwarf-4 -fdebug-types-section -S -o
2# typedef struct
3# {
4#   unsigned a;
5#   unsigned b;
6# } S;
7#
8# int main() {
9#   S s;
10#   s.a = 0x64A40101;
11# }
12	.text
13	.file	"main.cpp"
14	.globl	main                            # -- Begin function main
15	.p2align	4, 0x90
16	.type	main,@function
17main:                                   # @main
18.Lfunc_begin0:
19	.file	1 "/dwarf4-lenght-test" "main.cpp"
20	.loc	1 7 0                           # main.cpp:7:0
21	.cfi_startproc
22# %bb.0:
23	pushq	%rbp
24	.cfi_def_cfa_offset 16
25	.cfi_offset %rbp, -16
26	movq	%rsp, %rbp
27	.cfi_def_cfa_register %rbp
28.Ltmp0:
29	.loc	1 9 7 prologue_end              # main.cpp:9:7
30	movl	$1688469761, -8(%rbp)           # imm = 0x64A40101
31	.loc	1 10 1                          # main.cpp:10:1
32	xorl	%eax, %eax
33	.loc	1 10 1 epilogue_begin is_stmt 0 # main.cpp:10:1
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	.section	.debug_types,"G",@progbits,4721183873463917179,comdat
43	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
44.Ldebug_info_start0:
45	.short	4                               # DWARF version number
46	.long	.debug_abbrev                   # Offset Into Abbrev. Section
47	.byte	8                               # Address Size (in bytes)
48	.quad	4721183873463917179             # Type Signature
49	.long	30                              # Type DIE Offset
50	.byte	1                               # Abbrev [1] 0x17:0x2d DW_TAG_type_unit
51	.short	33                              # DW_AT_language
52	.long	.Lline_table_start0             # DW_AT_stmt_list
53	.byte	2                               # Abbrev [2] 0x1e:0x1e DW_TAG_structure_type
54	.byte	5                               # DW_AT_calling_convention
55	.byte	8                               # DW_AT_byte_size
56	.byte	1                               # DW_AT_decl_file
57	.byte	1                               # DW_AT_decl_line
58	.byte	3                               # Abbrev [3] 0x23:0xc DW_TAG_member
59	.long	.Linfo_string6                  # DW_AT_name
60	.long	60                              # DW_AT_type
61	.byte	1                               # DW_AT_decl_file
62	.byte	3                               # DW_AT_decl_line
63	.byte	0                               # DW_AT_data_member_location
64	.byte	3                               # Abbrev [3] 0x2f:0xc DW_TAG_member
65	.long	.Linfo_string8                  # DW_AT_name
66	.long	60                              # DW_AT_type
67	.byte	1                               # DW_AT_decl_file
68	.byte	4                               # DW_AT_decl_line
69	.byte	4                               # DW_AT_data_member_location
70	.byte	0                               # End Of Children Mark
71	.byte	4                               # Abbrev [4] 0x3c:0x7 DW_TAG_base_type
72	.long	.Linfo_string7                  # DW_AT_name
73	.byte	7                               # DW_AT_encoding
74	.byte	4                               # DW_AT_byte_size
75	.byte	0                               # End Of Children Mark
76.Ldebug_info_end0:
77	.section	.debug_abbrev,"",@progbits
78	.byte	1                               # Abbreviation Code
79	.byte	65                              # DW_TAG_type_unit
80	.byte	1                               # DW_CHILDREN_yes
81	.byte	19                              # DW_AT_language
82	.byte	5                               # DW_FORM_data2
83	.byte	16                              # DW_AT_stmt_list
84	.byte	23                              # DW_FORM_sec_offset
85	.byte	0                               # EOM(1)
86	.byte	0                               # EOM(2)
87	.byte	2                               # Abbreviation Code
88	.byte	19                              # DW_TAG_structure_type
89	.byte	1                               # DW_CHILDREN_yes
90	.byte	54                              # DW_AT_calling_convention
91	.byte	11                              # DW_FORM_data1
92	.byte	11                              # DW_AT_byte_size
93	.byte	11                              # DW_FORM_data1
94	.byte	58                              # DW_AT_decl_file
95	.byte	11                              # DW_FORM_data1
96	.byte	59                              # DW_AT_decl_line
97	.byte	11                              # DW_FORM_data1
98	.byte	0                               # EOM(1)
99	.byte	0                               # EOM(2)
100	.byte	3                               # Abbreviation Code
101	.byte	13                              # DW_TAG_member
102	.byte	0                               # DW_CHILDREN_no
103	.byte	3                               # DW_AT_name
104	.byte	14                              # DW_FORM_strp
105	.byte	73                              # DW_AT_type
106	.byte	19                              # DW_FORM_ref4
107	.byte	58                              # DW_AT_decl_file
108	.byte	11                              # DW_FORM_data1
109	.byte	59                              # DW_AT_decl_line
110	.byte	11                              # DW_FORM_data1
111	.byte	56                              # DW_AT_data_member_location
112	.byte	11                              # DW_FORM_data1
113	.byte	0                               # EOM(1)
114	.byte	0                               # EOM(2)
115	.byte	4                               # Abbreviation Code
116	.byte	36                              # DW_TAG_base_type
117	.byte	0                               # DW_CHILDREN_no
118	.byte	3                               # DW_AT_name
119	.byte	14                              # DW_FORM_strp
120	.byte	62                              # DW_AT_encoding
121	.byte	11                              # DW_FORM_data1
122	.byte	11                              # DW_AT_byte_size
123	.byte	11                              # DW_FORM_data1
124	.byte	0                               # EOM(1)
125	.byte	0                               # EOM(2)
126	.byte	5                               # Abbreviation Code
127	.byte	17                              # DW_TAG_compile_unit
128	.byte	1                               # DW_CHILDREN_yes
129	.byte	37                              # DW_AT_producer
130	.byte	14                              # DW_FORM_strp
131	.byte	19                              # DW_AT_language
132	.byte	5                               # DW_FORM_data2
133	.byte	3                               # DW_AT_name
134	.byte	14                              # DW_FORM_strp
135	.byte	16                              # DW_AT_stmt_list
136	.byte	23                              # DW_FORM_sec_offset
137	.byte	27                              # DW_AT_comp_dir
138	.byte	14                              # DW_FORM_strp
139	.ascii	"\264B"                         # DW_AT_GNU_pubnames
140	.byte	25                              # DW_FORM_flag_present
141	.byte	17                              # DW_AT_low_pc
142	.byte	1                               # DW_FORM_addr
143	.byte	18                              # DW_AT_high_pc
144	.byte	6                               # DW_FORM_data4
145	.byte	0                               # EOM(1)
146	.byte	0                               # EOM(2)
147	.byte	6                               # Abbreviation Code
148	.byte	46                              # DW_TAG_subprogram
149	.byte	1                               # DW_CHILDREN_yes
150	.byte	17                              # DW_AT_low_pc
151	.byte	1                               # DW_FORM_addr
152	.byte	18                              # DW_AT_high_pc
153	.byte	6                               # DW_FORM_data4
154	.byte	64                              # DW_AT_frame_base
155	.byte	24                              # DW_FORM_exprloc
156	.byte	3                               # DW_AT_name
157	.byte	14                              # DW_FORM_strp
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	73                              # DW_AT_type
163	.byte	19                              # DW_FORM_ref4
164	.byte	63                              # DW_AT_external
165	.byte	25                              # DW_FORM_flag_present
166	.byte	0                               # EOM(1)
167	.byte	0                               # EOM(2)
168	.byte	7                               # Abbreviation Code
169	.byte	52                              # DW_TAG_variable
170	.byte	0                               # DW_CHILDREN_no
171	.byte	2                               # DW_AT_location
172	.byte	24                              # DW_FORM_exprloc
173	.byte	3                               # DW_AT_name
174	.byte	14                              # DW_FORM_strp
175	.byte	58                              # DW_AT_decl_file
176	.byte	11                              # DW_FORM_data1
177	.byte	59                              # DW_AT_decl_line
178	.byte	11                              # DW_FORM_data1
179	.byte	73                              # DW_AT_type
180	.byte	19                              # DW_FORM_ref4
181	.byte	0                               # EOM(1)
182	.byte	0                               # EOM(2)
183	.byte	8                               # Abbreviation Code
184	.byte	22                              # DW_TAG_typedef
185	.byte	0                               # DW_CHILDREN_no
186	.byte	73                              # DW_AT_type
187	.byte	19                              # DW_FORM_ref4
188	.byte	3                               # DW_AT_name
189	.byte	14                              # DW_FORM_strp
190	.byte	58                              # DW_AT_decl_file
191	.byte	11                              # DW_FORM_data1
192	.byte	59                              # DW_AT_decl_line
193	.byte	11                              # DW_FORM_data1
194	.byte	0                               # EOM(1)
195	.byte	0                               # EOM(2)
196	.byte	9                               # Abbreviation Code
197	.byte	19                              # DW_TAG_structure_type
198	.byte	0                               # DW_CHILDREN_no
199	.byte	60                              # DW_AT_declaration
200	.byte	25                              # DW_FORM_flag_present
201	.byte	105                             # DW_AT_signature
202	.byte	32                              # DW_FORM_ref_sig8
203	.byte	0                               # EOM(1)
204	.byte	0                               # EOM(2)
205	.byte	0                               # EOM(3)
206	.section	.debug_info,"",@progbits
207.Lcu_begin0:
208	.long	.Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit
209.Ldebug_info_start1:
210	.short	4                               # DWARF version number
211	.long	.debug_abbrev                   # Offset Into Abbrev. Section
212	.byte	8                               # Address Size (in bytes)
213	.byte	5                               # Abbrev [5] 0xb:0x63 DW_TAG_compile_unit
214	.long	.Linfo_string0                  # DW_AT_producer
215	.short	33                              # DW_AT_language
216	.long	.Linfo_string1                  # DW_AT_name
217	.long	.Lline_table_start0             # DW_AT_stmt_list
218	.long	.Linfo_string2                  # DW_AT_comp_dir
219                                        # DW_AT_GNU_pubnames
220	.quad	.Lfunc_begin0                   # DW_AT_low_pc
221	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
222	.byte	6                               # Abbrev [6] 0x2a:0x28 DW_TAG_subprogram
223	.quad	.Lfunc_begin0                   # DW_AT_low_pc
224	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
225	.byte	1                               # DW_AT_frame_base
226	.byte	86
227	.long	.Linfo_string3                  # DW_AT_name
228	.byte	1                               # DW_AT_decl_file
229	.byte	7                               # DW_AT_decl_line
230	.long	82                              # DW_AT_type
231                                        # DW_AT_external
232	.byte	7                               # Abbrev [7] 0x43:0xe DW_TAG_variable
233	.byte	2                               # DW_AT_location
234	.byte	145
235	.byte	120
236	.long	.Linfo_string5                  # DW_AT_name
237	.byte	1                               # DW_AT_decl_file
238	.byte	8                               # DW_AT_decl_line
239	.long	89                              # DW_AT_type
240	.byte	0                               # End Of Children Mark
241	.byte	4                               # Abbrev [4] 0x52:0x7 DW_TAG_base_type
242	.long	.Linfo_string4                  # DW_AT_name
243	.byte	5                               # DW_AT_encoding
244	.byte	4                               # DW_AT_byte_size
245	.byte	8                               # Abbrev [8] 0x59:0xb DW_TAG_typedef
246	.long	100                             # DW_AT_type
247	.long	.Linfo_string9                  # DW_AT_name
248	.byte	1                               # DW_AT_decl_file
249	.byte	5                               # DW_AT_decl_line
250	.byte	9                               # Abbrev [9] 0x64:0x9 DW_TAG_structure_type
251                                        # DW_AT_declaration
252	.quad	4721183873463917179             # DW_AT_signature
253	.byte	0                               # End Of Children Mark
254.Ldebug_info_end1:
255	.section	.debug_str,"MS",@progbits,1
256.Linfo_string0:
257	.asciz	"clang version 15.0.0" # string offset=0
258.Linfo_string1:
259	.asciz	"main.cpp"                      # string offset=146
260.Linfo_string2:
261	.asciz	"/dwarf4-lenght-test" # string offset=155
262.Linfo_string3:
263	.asciz	"main"                          # string offset=212
264.Linfo_string4:
265	.asciz	"int"                           # string offset=217
266.Linfo_string5:
267	.asciz	"s"                             # string offset=221
268.Linfo_string6:
269	.asciz	"a"                             # string offset=223
270.Linfo_string7:
271	.asciz	"unsigned int"                  # string offset=225
272.Linfo_string8:
273	.asciz	"b"                             # string offset=238
274.Linfo_string9:
275	.asciz	"S"                             # string offset=240
276	.section	.debug_gnu_pubnames,"",@progbits
277	.long	.LpubNames_end0-.LpubNames_start0 # Length of Public Names Info
278.LpubNames_start0:
279	.short	2                               # DWARF Version
280	.long	.Lcu_begin0                     # Offset of Compilation Unit Info
281	.long	110                             # Compilation Unit Length
282	.long	42                              # DIE offset
283	.byte	48                              # Attributes: FUNCTION, EXTERNAL
284	.asciz	"main"                          # External Name
285	.long	0                               # End Mark
286.LpubNames_end0:
287	.section	.debug_gnu_pubtypes,"",@progbits
288	.long	.LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info
289.LpubTypes_start0:
290	.short	2                               # DWARF Version
291	.long	.Lcu_begin0                     # Offset of Compilation Unit Info
292	.long	110                             # Compilation Unit Length
293	.long	82                              # DIE offset
294	.byte	144                             # Attributes: TYPE, STATIC
295	.asciz	"int"                           # External Name
296	.long	89                              # DIE offset
297	.byte	144                             # Attributes: TYPE, STATIC
298	.asciz	"S"                             # External Name
299	.long	11                              # DIE offset
300	.byte	16                              # Attributes: TYPE, EXTERNAL
301	.asciz	"unsigned int"                  # External Name
302	.long	0                               # End Mark
303.LpubTypes_end0:
304	.ident	"clang version 15.0.0)"
305	.section	".note.GNU-stack","",@progbits
306	.addrsig
307	.section	.debug_line,"",@progbits
308.Lline_table_start0:
309