xref: /netbsd-src/external/gpl3/gdb.old/dist/gdb/testsuite/gdb.dwarf2/dw2-compdir-oldgcc.S (revision 87d689fb734c654d2486f87f7be32f1b53ecdbec)
1/* This testcase is part of GDB, the GNU debugger.
2
3   Copyright 2012-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#define CONCAT1(a, b) CONCAT2(a, b)
19#define CONCAT2(a, b) a ## b
20
21#ifdef SYMBOL_PREFIX
22# define SYMBOL(str)     CONCAT1(SYMBOL_PREFIX, str)
23#else
24# define SYMBOL(str)     str
25#endif
26
27	.text
28SYMBOL(main):	.globl SYMBOL(main)
29
30gcc42:	.globl gcc42
31.Lgcc42_procstart:
32	.int 0
33	.type gcc42, %function
34	.size gcc42, . - gcc42
35.Lgcc42_procend:
36
37gcc43:	.globl gcc43
38.Lgcc43_procstart:
39	.int 0
40	.type gcc43, %function
41	.size gcc43, . - gcc43
42.Lgcc43_procend:
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	.uleb128 1				/* Abbrev: DW_TAG_compile_unit */
56	.4byte	.Lgcc42_begin			/* DW_AT_stmt_list */
57	.4byte	.Lgcc42_procstart		/* DW_AT_low_pc */
58	.4byte	.Lgcc42_procend			/* DW_AT_high_pc */
59	.ascii	"/dir/d/dw2-compdir-oldgcc42.S\0"	/* DW_AT_name */
60	.ascii	"GNU C 4.2.0\0"			/* DW_AT_producer */
61	.byte	1				/* DW_AT_language (C) */
62
63	.uleb128	2			/* Abbrev: DW_TAG_subprogram */
64	.byte		1			/* DW_AT_external */
65	.byte		1			/* DW_AT_decl_file */
66	.byte		1			/* DW_AT_decl_line */
67	.ascii		"gcc42\0"		/* DW_AT_name */
68	.4byte		.Lgcc42_procstart	/* DW_AT_low_pc */
69	.4byte		.Lgcc42_procend		/* DW_AT_high_pc */
70
71	.byte		0			/* End of children of CU */
72.Lcu1_end:
73
74.Lcu2_begin:
75	/* CU header */
76	.4byte	.Lcu2_end - .Lcu2_start	/* Length of Compilation Unit */
77.Lcu2_start:
78	.2byte	2				/* DWARF Version */
79	.4byte	.Labbrev1_begin			/* Offset into abbrev section */
80	.byte	4				/* Pointer size */
81
82	.uleb128 1				/* Abbrev: DW_TAG_compile_unit */
83	.4byte	.Lgcc43_begin			/* DW_AT_stmt_list */
84	.4byte	.Lgcc43_procstart		/* DW_AT_low_pc */
85	.4byte	.Lgcc43_procend			/* DW_AT_high_pc */
86	.ascii	"/dir/d/dw2-compdir-oldgcc43.S\0"	/* DW_AT_name */
87	.ascii	"GNU C 4.3.0\0"			/* DW_AT_producer */
88	.byte	1				/* DW_AT_language (C) */
89
90	.uleb128	2			/* Abbrev: DW_TAG_subprogram */
91	.byte		1			/* DW_AT_external */
92	.byte		1			/* DW_AT_decl_file */
93	.byte		1			/* DW_AT_decl_line */
94	.ascii		"gcc43\0"		/* DW_AT_name */
95	.4byte		.Lgcc43_procstart	/* DW_AT_low_pc */
96	.4byte		.Lgcc43_procend		/* DW_AT_high_pc */
97
98	.byte		0			/* End of children of CU */
99.Lcu2_end:
100
101/* Abbrev table */
102	.section .debug_abbrev
103.Labbrev1_begin:
104	.uleb128	1			/* Abbrev code */
105	.uleb128	0x11			/* DW_TAG_compile_unit */
106	.byte		1			/* has_children */
107	.uleb128	0x10			/* DW_AT_stmt_list */
108	.uleb128	0x6			/* DW_FORM_data4 */
109	.uleb128	0x11			/* DW_AT_low_pc */
110	.uleb128	0x1			/* DW_FORM_addr */
111	.uleb128	0x12			/* DW_AT_high_pc */
112	.uleb128	0x1			/* DW_FORM_addr */
113	.uleb128	0x3			/* DW_AT_name */
114	.uleb128	0x8			/* DW_FORM_string */
115	.uleb128	0x25			/* DW_AT_producer */
116	.uleb128	0x8			/* DW_FORM_string */
117	.uleb128	0x13			/* DW_AT_language */
118	.uleb128	0xb			/* DW_FORM_data1 */
119	.byte		0x0			/* Terminator */
120	.byte		0x0			/* Terminator */
121
122	.uleb128	2			/* Abbrev code */
123	.uleb128	0x2e			/* DW_TAG_subprogram */
124	.byte		0			/* has_children */
125	.uleb128	0x3f			/* DW_AT_external */
126	.uleb128	0xc			/* DW_FORM_flag */
127	.uleb128	0x3a			/* DW_AT_decl_file */
128	.uleb128	0xb			/* DW_FORM_data1 */
129	.uleb128	0x3b			/* DW_AT_decl_line */
130	.uleb128	0xb			/* DW_FORM_data1 */
131	.uleb128	0x3			/* DW_AT_name */
132	.uleb128	0x8			/* DW_FORM_string */
133	.uleb128	0x11			/* DW_AT_low_pc */
134	.uleb128	0x1			/* DW_FORM_addr */
135	.uleb128	0x12			/* DW_AT_high_pc */
136	.uleb128	0x1			/* DW_FORM_addr */
137	.byte		0x0			/* Terminator */
138	.byte		0x0			/* Terminator */
139
140	.byte		0x0			/* Terminator */
141	.byte		0x0			/* Terminator */
142
143/* Line table */
144	.section .debug_line
145.Lgcc42_begin:
146	.4byte		.Lgcc42_end - .Lgcc42_start	/* Initial length */
147.Lgcc42_start:
148	.2byte		2			/* Version */
149	.4byte		.Lgcc42_lines - .Lgcc42_hdr	/* header_length */
150.Lgcc42_hdr:
151	.byte		1			/* Minimum insn length */
152	.byte		1			/* default_is_stmt */
153	.byte		1			/* line_base */
154 	.byte		1			/* line_range */
155	.byte		4			/* opcode_base */
156
157	/* Standard lengths */
158	.byte		0
159	.byte		1
160	.byte		1
161
162	/* Include directories */
163	.byte		0
164
165	/* File names */
166	.ascii		"dw2-compdir-oldgcc42.S\0"
167	.uleb128	0	/* directory */
168	.uleb128	0
169	.uleb128	0
170
171	.byte		0
172
173.Lgcc42_lines:
174	.byte		0	/* DW_LNE_set_address */
175	.uleb128	5
176	.byte		2
177	.4byte		gcc42
178
179	.byte		3	/* DW_LNS_advance_line */
180	.sleb128	41	/* ... to 42 */
181
182	.byte		1	/* DW_LNS_copy */
183
184	.byte		0	/* DW_LNE_set_address */
185	.uleb128	5
186	.byte		2
187	.4byte		.Lgcc42_procend
188
189	.byte		0	/* DW_LNE_end_of_sequence */
190	.uleb128	1
191	.byte		1
192.Lgcc42_end:
193
194.Lgcc43_begin:
195	.4byte		.Lgcc43_end - .Lgcc43_start	/* Initial length */
196.Lgcc43_start:
197	.2byte		2			/* Version */
198	.4byte		.Lgcc43_lines - .Lgcc43_hdr	/* header_length */
199.Lgcc43_hdr:
200	.byte		1			/* Minimum insn length */
201	.byte		1			/* default_is_stmt */
202	.byte		1			/* line_base */
203 	.byte		1			/* line_range */
204	.byte		4			/* opcode_base */
205
206	/* Standard lengths */
207	.byte		0
208	.byte		1
209	.byte		1
210
211	/* Include directories */
212	.byte		0
213
214	/* File names */
215	.ascii		"dw2-compdir-oldgcc43.S\0"
216	.uleb128	0	/* directory */
217	.uleb128	0
218	.uleb128	0
219
220	.byte		0
221
222.Lgcc43_lines:
223	.byte		0	/* DW_LNE_set_address */
224	.uleb128	5
225	.byte		2
226	.4byte		gcc43
227
228	.byte		3	/* DW_LNS_advance_line */
229	.sleb128	42	/* ... to 43 */
230
231	.byte		1	/* DW_LNS_copy */
232
233	.byte		0	/* DW_LNE_set_address */
234	.uleb128	5
235	.byte		2
236	.4byte		.Lgcc43_procend
237
238	.byte		0	/* DW_LNE_end_of_sequence */
239	.uleb128	1
240	.byte		1
241.Lgcc43_end:
242