xref: /netbsd-src/external/gpl3/gdb.old/dist/gdb/testsuite/gdb.dwarf2/fission-base.S (revision cef8759bd76c1b621f8eab8faa6f208faabc2e15)
1/* This testcase is part of GDB, the GNU debugger.
2
3   Copyright 2012-2017 Free Software Foundation, Inc.
4
5   This program is free software; you can redistribute it and/or modify
6   it under the terms of the GNU General Public License as published by
7   the Free Software Foundation; either version 3 of the License, or
8   (at your option) any later version.
9
10   This program is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   GNU General Public License for more details.
14
15   You should have received a copy of the GNU General Public License
16   along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18   This file was created by doing:
19   gcc -gdwarf-4 -gsplit-debug -S -dA fission-base.c
20   and then massaging the output.
21*/
22
23	.file	"fission-base.c"
24
25	.text
26.Ltext0:
27
28	.globl	func
29	.type	func, @function
30func:
31.LFB0:
32	.file 1 "fission-base.c"
33	# fission-base.c:20
34	.loc 1 20 0
35	.cfi_startproc
36	pushq	%rbp	#
37	.cfi_def_cfa_offset 16
38	.cfi_offset 6, -16
39	movq	%rsp, %rbp	#,
40	.cfi_def_cfa_register 6
41	movl	%edi, -4(%rbp)	# arg, arg
42	# fission-base.c:21
43	.loc 1 21 0
44	movl	-4(%rbp), %eax	# arg, tmp61
45	addl	$1, %eax	#, D.1617
46	# fission-base.c:22
47	.loc 1 22 0
48	popq	%rbp	#
49	.cfi_def_cfa 7, 8
50	ret
51	.cfi_endproc
52.LFE0:
53	.size	func, .-func
54	.globl	main
55	.type	main, @function
56main:
57.LFB1:
58	# fission-base.c:26
59	.loc 1 26 0
60	.cfi_startproc
61	pushq	%rbp	#
62	.cfi_def_cfa_offset 16
63	.cfi_offset 6, -16
64	movq	%rsp, %rbp	#,
65	.cfi_def_cfa_register 6
66	# fission-base.c:27
67	.loc 1 27 0
68	movl	$-1, %edi	#,
69	call	func	#
70	# fission-base.c:28
71	.loc 1 28 0
72	popq	%rbp	#
73	.cfi_def_cfa 7, 8
74	ret
75	.cfi_endproc
76.LFE1:
77	.size	main, .-main
78.Letext0:
79	.section	.debug_info.dwo,"e",@progbits
80.Ldebug_info0:
81	.4byte	.Ldebug_info0_end - .Ldebug_info0 - 4 # Length of Compilation Unit Info
82	.2byte	0x4	# DWARF version number
83	.4byte	.Ldebug_abbrev0	# Offset Into Abbrev. Section
84	.byte	0x8	# Pointer Size (in bytes)
85	.uleb128 0x1	# (DIE (0xb) DW_TAG_compile_unit)
86	.ascii "GNU C 4.6.x-fission\0"	# DW_AT_producer
87	.byte	0x1	# DW_AT_language
88	.ascii "fission-base.c\0"	# DW_AT_name
89	.ascii "/tmp/src/gdb/testsuite\0"	# DW_AT_comp_dir
90	.byte	1	# DW_AT_GNU_dwo_id
91	.byte	2
92	.byte	3
93	.byte	4
94	.byte	5
95	.byte	6
96	.byte	7
97	.byte	8
98	.uleb128 0x2	# (DIE (0x89) DW_TAG_subprogram)
99			# DW_AT_external
100	.ascii "func\0"	# DW_AT_name
101	.byte	0x1	# DW_AT_decl_file (fission-base.c)
102	.byte	0x13	# DW_AT_decl_line
103			# DW_AT_prototyped
104	.4byte	.Ldebug_info0_int - .Ldebug_info0 # DW_AT_type
105	.4byte	0x0	# DW_AT_ranges
106	.uleb128 0x1	# DW_AT_frame_base
107	.byte	0x9c	# DW_OP_call_frame_cfa
108	.4byte	.Ldebug_info0_int - .Ldebug_info0 # DW_AT_sibling
109	.uleb128 0x3	# (DIE (0xa4) DW_TAG_formal_parameter)
110	.ascii "arg\0"	# DW_AT_name
111	.byte	0x1	# DW_AT_decl_file (fission-base.c)
112	.byte	0x13	# DW_AT_decl_line
113	.4byte	.Ldebug_info0_int - .Ldebug_info0 # DW_AT_type
114	.uleb128 0x2	# DW_AT_location
115	.byte	0x91	# DW_OP_fbreg
116	.sleb128 -20
117	.byte	0	# end of children of DIE 0x89
118.Ldebug_info0_int:
119	.uleb128 0x4	# (DIE (0xb3) DW_TAG_base_type)
120	.byte	0x4	# DW_AT_byte_size
121	.byte	0x5	# DW_AT_encoding
122	.ascii "int\0"	# DW_AT_name
123	.uleb128 0x5	# (DIE (0xba) DW_TAG_subprogram)
124			# DW_AT_external
125	.ascii "main\0"	# DW_AT_name
126	.byte	0x1	# DW_AT_decl_file (fission-base.c)
127	.byte	0x19	# DW_AT_decl_line
128	.4byte	.Ldebug_info0_int - .Ldebug_info0 # DW_AT_type
129	.uleb128 0x1	# DW_AT_low_pc
130	.8byte	.LFE1-.LFB1	# DW_AT_high_pc
131	.uleb128 0x1	# DW_AT_frame_base
132	.byte	0x9c	# DW_OP_call_frame_cfa
133	.byte	0	# end of children of DIE 0xb
134.Ldebug_info0_end:
135	.section	.debug_info,"",@progbits
136.Lskeleton_debug_info0:
137	.4byte	.Lskeleton_debug_info0_end - .Lskeleton_debug_info0 - 4 # Length of Compilation Unit Info
138	.2byte	0x4	# DWARF version number
139	.4byte	.Lskeleton_debug_abbrev0	# Offset Into Abbrev. Section
140	.byte	0x8	# Pointer Size (in bytes)
141	.uleb128 0x1	# (DIE (0) DW_TAG_compile_unit)
142	.8byte	.Ltext0	# DW_AT_low_pc
143	.8byte	.Letext0-.Ltext0	# DW_AT_high_pc
144	.4byte	.Ldebug_line0	# DW_AT_stmt_list
145	.ascii "/tmp/src/gdb/testsuite\0"	# DW_AT_comp_dir
146	.ascii "fission-base.dwo\0"	# DW_AT_GNU_dwo_name
147	.4byte	.Ldebug_pubnames0	# DW_AT_GNU_pubnames
148	.4byte	.Ldebug_pubtypes0	# DW_AT_GNU_pubtypes
149	.4byte	.Ldebug_addr0_begin	# DW_AT_GNU_addr_base
150	.4byte	.Ldebug_ranges0_begin	# DW_AT_GNU_ranges_base
151	.byte	1	# DW_AT_GNU_dwo_id
152	.byte	2
153	.byte	3
154	.byte	4
155	.byte	5
156	.byte	6
157	.byte	7
158	.byte	8
159.Lskeleton_debug_info0_end:
160	.section	.debug_abbrev,"",@progbits
161.Lskeleton_debug_abbrev0:
162	.uleb128 0x1	# (abbrev code)
163	.uleb128 0x11	# (TAG: DW_TAG_compile_unit)
164	.byte	0	# DW_children_no
165	.uleb128 0x11	# (DW_AT_low_pc)
166	.uleb128 0x1	# (DW_FORM_addr)
167	.uleb128 0x12	# (DW_AT_high_pc)
168	.uleb128 0x7	# (DW_FORM_data8)
169	.uleb128 0x10	# (DW_AT_stmt_list)
170	.uleb128 0x17	# (DW_FORM_sec_offset)
171	.uleb128 0x1b	# (DW_AT_comp_dir)
172	.uleb128 0x8	# (DW_FORM_string)
173	.uleb128 0x2130	# (DW_AT_GNU_dwo_name)
174	.uleb128 0x8	# (DW_FORM_string)
175	.uleb128 0x2134	# (DW_AT_GNU_pubnames)
176	.uleb128 0x17	# (DW_FORM_sec_offset)
177	.uleb128 0x2135	# (DW_AT_GNU_pubtypes)
178	.uleb128 0x17	# (DW_FORM_sec_offset)
179	.uleb128 0x2133	# (DW_AT_GNU_addr_base)
180	.uleb128 0x17	# (DW_FORM_sec_offset)
181	.uleb128 0x2132	# (DW_AT_GNU_ranges_base)
182	.uleb128 0x17	# (DW_FORM_sec_offset)
183	.uleb128 0x2131	# (DW_AT_GNU_dwo_id)
184	.uleb128 0x7	# (DW_FORM_data8)
185	.byte	0
186	.byte	0
187	.byte	0	# end of skeleton .debug_abbrev
188	.section	.debug_abbrev.dwo,"e",@progbits
189.Ldebug_abbrev0:
190	.uleb128 0x1	# (abbrev code)
191	.uleb128 0x11	# (TAG: DW_TAG_compile_unit)
192	.byte	0x1	# DW_children_yes
193	.uleb128 0x25	# (DW_AT_producer)
194	.uleb128 0x8	# (DW_FORM_string)
195	.uleb128 0x13	# (DW_AT_language)
196	.uleb128 0xb	# (DW_FORM_data1)
197	.uleb128 0x3	# (DW_AT_name)
198	.uleb128 0x8	# (DW_FORM_string)
199	.uleb128 0x1b	# (DW_AT_comp_dir)
200	.uleb128 0x8	# (DW_FORM_string)
201	.uleb128 0x2131	# (DW_AT_GNU_dwo_id)
202	.uleb128 0x7	# (DW_FORM_data8)
203	.byte	0
204	.byte	0
205	.uleb128 0x2	# (abbrev code)
206	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
207	.byte	0x1	# DW_children_yes
208	.uleb128 0x3f	# (DW_AT_external)
209	.uleb128 0x19	# (DW_FORM_flag_present)
210	.uleb128 0x3	# (DW_AT_name)
211	.uleb128 0x8	# (DW_FORM_string)
212	.uleb128 0x3a	# (DW_AT_decl_file)
213	.uleb128 0xb	# (DW_FORM_data1)
214	.uleb128 0x3b	# (DW_AT_decl_line)
215	.uleb128 0xb	# (DW_FORM_data1)
216	.uleb128 0x27	# (DW_AT_prototyped)
217	.uleb128 0x19	# (DW_FORM_flag_present)
218	.uleb128 0x49	# (DW_AT_type)
219	.uleb128 0x13	# (DW_FORM_ref4)
220	.uleb128 0x55	# (DW_AT_ranges)
221	.uleb128 0x17	# (DW_FORM_sec_offset)
222	.uleb128 0x40	# (DW_AT_frame_base)
223	.uleb128 0x18	# (DW_FORM_exprloc)
224	.uleb128 0x1	# (DW_AT_sibling)
225	.uleb128 0x13	# (DW_FORM_ref4)
226	.byte	0
227	.byte	0
228	.uleb128 0x3	# (abbrev code)
229	.uleb128 0x5	# (TAG: DW_TAG_formal_parameter)
230	.byte	0	# DW_children_no
231	.uleb128 0x3	# (DW_AT_name)
232	.uleb128 0x8	# (DW_FORM_string)
233	.uleb128 0x3a	# (DW_AT_decl_file)
234	.uleb128 0xb	# (DW_FORM_data1)
235	.uleb128 0x3b	# (DW_AT_decl_line)
236	.uleb128 0xb	# (DW_FORM_data1)
237	.uleb128 0x49	# (DW_AT_type)
238	.uleb128 0x13	# (DW_FORM_ref4)
239	.uleb128 0x2	# (DW_AT_location)
240	.uleb128 0x18	# (DW_FORM_exprloc)
241	.byte	0
242	.byte	0
243	.uleb128 0x4	# (abbrev code)
244	.uleb128 0x24	# (TAG: DW_TAG_base_type)
245	.byte	0	# DW_children_no
246	.uleb128 0xb	# (DW_AT_byte_size)
247	.uleb128 0xb	# (DW_FORM_data1)
248	.uleb128 0x3e	# (DW_AT_encoding)
249	.uleb128 0xb	# (DW_FORM_data1)
250	.uleb128 0x3	# (DW_AT_name)
251	.uleb128 0x8	# (DW_FORM_string)
252	.byte	0
253	.byte	0
254	.uleb128 0x5	# (abbrev code)
255	.uleb128 0x2e	# (TAG: DW_TAG_subprogram)
256	.byte	0	# DW_children_no
257	.uleb128 0x3f	# (DW_AT_external)
258	.uleb128 0x19	# (DW_FORM_flag_present)
259	.uleb128 0x3	# (DW_AT_name)
260	.uleb128 0x8	# (DW_FORM_string)
261	.uleb128 0x3a	# (DW_AT_decl_file)
262	.uleb128 0xb	# (DW_FORM_data1)
263	.uleb128 0x3b	# (DW_AT_decl_line)
264	.uleb128 0xb	# (DW_FORM_data1)
265	.uleb128 0x49	# (DW_AT_type)
266	.uleb128 0x13	# (DW_FORM_ref4)
267	.uleb128 0x11	# (DW_AT_low_pc)
268	.uleb128 0x1f01	# (DW_FORM_GNU_addr_index)
269	.uleb128 0x12	# (DW_AT_high_pc)
270	.uleb128 0x7	# (DW_FORM_data8)
271	.uleb128 0x40	# (DW_AT_frame_base)
272	.uleb128 0x18	# (DW_FORM_exprloc)
273	.byte	0
274	.byte	0
275	.byte	0
276	.section	.debug_gnu_pubnames,"",@progbits
277.Ldebug_pubnames0:
278	.long	0x22	# Pub Info Length
279	.value	0x2	# DWARF Version
280	.long	.Lskeleton_debug_info0	# Offset of Compilation Unit Info
281	.long	0x59	# Compilation Unit Length
282	.long	0x18	# DIE offset
283	.byte	0x30	# GDB-index flags
284	.ascii "func\0"	# external name
285	.long	0x45	# DIE offset
286	.byte	0x30	# GDB-index flags
287	.ascii "main\0"	# external name
288	.long	0
289	.section	.debug_gnu_pubtypes,"",@progbits
290.Ldebug_pubtypes0:
291	.long	0x17	# Pub Info Length
292	.value	0x2	# DWARF Version
293	.long	.Lskeleton_debug_info0	# Offset of Compilation Unit Info
294	.long	0x59	# Compilation Unit Length
295	.long	0x3e	# DIE offset
296	.byte	0x90	# GDB-index flags
297	.ascii "int\0"	# external name
298	.long	0
299	.section	.debug_aranges,"",@progbits
300	.4byte	0x2c	# Length of Address Ranges Info
301	.2byte	0x2	# DWARF Version
302	.4byte	.Lskeleton_debug_info0	# Offset of Compilation Unit Info
303	.byte	0x8	# Size of Address
304	.byte	0	# Size of Segment Descriptor
305	.2byte	0	# Pad to 16 byte boundary
306	.2byte	0
307	.8byte	.Ltext0	# Address
308	.8byte	.Letext0-.Ltext0	# Length
309	.8byte	0
310	.8byte	0
311	.section	.debug_line,"",@progbits
312.Ldebug_line0:
313	.section	.debug_line.dwo,"e",@progbits
314.Lskeleton_debug_line0:
315	.4byte	.LELT0-.LSLT0	# Length of Source Line Info
316.LSLT0:
317	.2byte	0x4	# DWARF Version
318	.4byte	.LELTP0-.LASLTP0	# Prolog Length
319.LASLTP0:
320	.byte	0x1	# Minimum Instruction Length
321	.byte	0x1	# Maximum Operations Per Instruction
322	.byte	0x1	# Default is_stmt_start flag
323	.byte	0xf6	# Line Base Value (Special Opcodes)
324	.byte	0xf5	# Line Range Value (Special Opcodes)
325	.byte	0xa	# Special Opcode Base
326	.byte	0	# opcode: 0x1 has 0 args
327	.byte	0x1	# opcode: 0x2 has 1 args
328	.byte	0x1	# opcode: 0x3 has 1 args
329	.byte	0x1	# opcode: 0x4 has 1 args
330	.byte	0x1	# opcode: 0x5 has 1 args
331	.byte	0	# opcode: 0x6 has 0 args
332	.byte	0	# opcode: 0x7 has 0 args
333	.byte	0	# opcode: 0x8 has 0 args
334	.byte	0x1	# opcode: 0x9 has 1 args
335	.byte	0	# End directory table
336	.ascii "fission-base.c\0"	# File Entry: 0x1
337	.uleb128 0
338	.uleb128 0
339	.uleb128 0
340	.byte	0	# End file name table
341.LELTP0:
342.LELT0:
343	.section	.debug_addr,"",@progbits
344.Ldebug_addr0:
345	# Shift the real entries down by a non-zero amount to test
346	# DW_AT_GNU_addr_base.
347	.8byte	0,0
348.Ldebug_addr0_begin:
349	.8byte	.LFB0	# DW_AT_low_pc
350	.8byte	.LFB1	# DW_AT_low_pc
351
352	.section	.debug_ranges,"",@progbits
353.Ldebug_ranges0:
354	# Shift the real entries down by a non-zero amount to test
355	# DW_AT_GNU_ranges_base.
356	.8byte	0,0
357.Ldebug_ranges0_begin:
358	# Note: Since the DW_TAG_compile_unit specifies low_pc, that sets
359	# the base address, and thus we have to subtract it here.
360	.8byte	.LFB0 - .Ltext0	# Offset 0
361	.8byte	.LFE0 - .Ltext0
362	.8byte	0
363	.8byte	0
364
365	.section	.note.GNU-stack,"",@progbits
366