xref: /netbsd-src/external/gpl3/gdb.old/dist/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap-outer.S (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1/* This testcase is part of GDB, the GNU debugger.
2
3   Copyright 2011-2016 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	.text
19
20	.globl _start
21_start:
22
23	.globl outer_before
24	.type outer_before, %function
25outer_before:
26.Lbegin_outer_before:
27	.int 0
28.Lend_outer_before:
29	.size outer_before, . - outer_before
30
31	.globl outer_inner
32outer_inner:
33
34	.int 0
35
36	.globl outer_after
37	.type outer_after, %function
38outer_after:
39.Lbegin_outer_after:
40	.int 0
41.Lend_outer_after:
42	.size outer_after, . - outer_after
43
44/* Debug information */
45
46	.section .debug_info
47.Lcu1_begin:
48	/* CU header */
49	.4byte	.Lcu1_end - .Lcu1_start		/* Length of Compilation Unit */
50.Lcu1_start:
51	.2byte	2				/* DWARF Version */
52	.4byte	.Labbrev1_begin			/* Offset into abbrev section */
53	.byte	4				/* Pointer size */
54
55	/* CU die */
56	.uleb128 1				/* Abbrev: DW_TAG_compile_unit */
57	.4byte	.Lline1_begin			/* DW_AT_stmt_list */
58	.4byte	.Ldebug_ranges			/* DW_AT_ranges */
59	.ascii	"outer.c\0"			/* DW_AT_name */
60        .ascii  "/tmp\0"			/* DW_AT_comp_dir */
61	.ascii	"GNU C 3.3.3\0"			/* DW_AT_producer */
62	.byte	1				/* DW_AT_language (C) */
63
64	/* outer_before */
65	.uleb128	2			/* Abbrev: DW_TAG_subprogram */
66	.byte		1			/* DW_AT_external */
67	.byte		1			/* DW_AT_decl_file */
68	.byte		1			/* DW_AT_decl_line */
69	.ascii		"outer_before\0"	/* DW_AT_name */
70	.4byte		.Lbegin_outer_before	/* DW_AT_low_pc */
71	.4byte		.Lend_outer_before	/* DW_AT_high_pc */
72
73	/* outer_after */
74	.uleb128	2			/* Abbrev: DW_TAG_subprogram */
75	.byte		1			/* DW_AT_external */
76	.byte		1			/* DW_AT_decl_file */
77	.byte		2			/* DW_AT_decl_line */
78	.ascii		"outer_after\0"		/* DW_AT_name */
79	.4byte		.Lbegin_outer_after	/* DW_AT_low_pc */
80	.4byte		.Lend_outer_after	/* DW_AT_high_pc */
81
82	.byte		0			/* End of children of CU */
83
84.Lcu1_end:
85
86/* DW_AT_ranges.  */
87	.section	.debug_ranges
88.Ldebug_ranges:
89	.4byte	.Lbegin_outer_before
90	.4byte	.Lend_outer_before
91	.4byte	.Lbegin_outer_after
92	.4byte	.Lend_outer_after
93	.4byte	0
94	.4byte	0
95
96/* Abbrev table */
97	.section .debug_abbrev
98.Labbrev1_begin:
99	.uleb128	1			/* Abbrev code */
100	.uleb128	0x11			/* DW_TAG_compile_unit */
101	.byte		1			/* has_children */
102	.uleb128	0x10			/* DW_AT_stmt_list */
103	.uleb128	0x6			/* DW_FORM_data4 */
104	.uleb128	0x55			/* DW_AT_ranges */
105	.uleb128	0x6			/* DW_FORM_data4 */
106	.uleb128	0x3			/* DW_AT_name */
107	.uleb128	0x8			/* DW_FORM_string */
108	.uleb128        0x1b                    /* DW_AT_comp_dir */
109	.uleb128	0x8			/* DW_FORM_string */
110	.uleb128	0x25			/* DW_AT_producer */
111	.uleb128	0x8			/* DW_FORM_string */
112	.uleb128	0x13			/* DW_AT_language */
113	.uleb128	0xb			/* DW_FORM_data1 */
114	.byte		0x0			/* Terminator */
115	.byte		0x0			/* Terminator */
116
117	.uleb128	2			/* Abbrev code */
118	.uleb128	0x2e			/* DW_TAG_subprogram */
119	.byte		0			/* has_children */
120	.uleb128	0x3f			/* DW_AT_external */
121	.uleb128	0xc			/* DW_FORM_flag */
122	.uleb128	0x3a			/* DW_AT_decl_file */
123	.uleb128	0xb			/* DW_FORM_data1 */
124	.uleb128	0x3b			/* DW_AT_decl_line */
125	.uleb128	0xb			/* DW_FORM_data1 */
126	.uleb128	0x3			/* DW_AT_name */
127	.uleb128	0x8			/* DW_FORM_string */
128	.uleb128	0x11			/* DW_AT_low_pc */
129	.uleb128	0x1			/* DW_FORM_addr */
130	.uleb128	0x12			/* DW_AT_high_pc */
131	.uleb128	0x1			/* DW_FORM_addr */
132	.byte		0x0			/* Terminator */
133	.byte		0x0			/* Terminator */
134
135	.byte		0x0			/* Terminator */
136	.byte		0x0			/* Terminator */
137
138/* Line table */
139	.section .debug_line
140.Lline1_begin:
141	.4byte		.Lline1_end - .Lline1_start	/* Initial length */
142.Lline1_start:
143	.2byte		2			/* Version */
144	.4byte		.Lline1_lines - .Lline1_hdr	/* header_length */
145.Lline1_hdr:
146	.byte		1			/* Minimum insn length */
147	.byte		1			/* default_is_stmt */
148	.byte		1			/* line_base */
149 	.byte		1			/* line_range */
150	.byte		0x10			/* opcode_base */
151
152	/* Standard lengths */
153	.byte		0
154	.byte		1
155	.byte		1
156	.byte		1
157	.byte		1
158	.byte		0
159	.byte		0
160	.byte		0
161	.byte		1
162	.byte		0
163	.byte		0
164	.byte		1
165	.byte		0
166	.byte		0
167	.byte		0
168
169	/* Include directories */
170        .ascii  "/tmp\0"
171	.byte		0
172
173	/* File names */
174	.ascii		"outer.c\0"
175	.uleb128	1
176	.uleb128	0
177	.uleb128	0
178
179	.byte		0
180
181.Lline1_lines:
182	.byte		0	/* DW_LNE_set_address */
183	.uleb128	5
184	.byte		2
185	.4byte		.Lbegin_outer_before
186
187	.byte		1	/* DW_LNS_copy */
188
189	.byte		0	/* DW_LNE_set_address */
190	.uleb128	5
191	.byte		2
192	.4byte		.Lbegin_outer_after
193
194	.byte		3	/* DW_LNS_advance_line */
195	.sleb128	2	/* ... to 3 */
196
197	.byte		1	/* DW_LNS_copy */
198
199	.byte		0	/* DW_LNE_set_address */
200	.uleb128	5
201	.byte		2
202	.4byte		.Lend_outer_after
203
204	.byte		0	/* DW_LNE_end_of_sequence */
205	.uleb128	1
206	.byte		1
207
208.Lline1_end:
209