* dwarf2read.c (init_cutu_and_read_dies): Renamed from
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / pr13961.S
CommitLineData
fd820528
DE
1/* Copyright 2012 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 3 of the License, or
6 (at your option) any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program. If not, see <http://www.gnu.org/licenses/>. */
15
16/* Testcase to exercise the code path in bug 13961.
17
18 Compiled from:
19
20 class foo
21 {
22 public:
23 int bar;
24 };
25
26 foo baz;
27
28 int
29 main ()
30 {
31 return 0;
32 }
33
34 And then manually edited to insert the necessary DW_AT_specification
35 entries to trigger the desired code path.
36 There's no real need to make this architecture-specific, so it has been
37 further hand-edited to support that.
38*/
39
40 .file "pr13961.cc"
41
42 .globl baz
43 .bss
44 .align 4
45 .type baz, @object
46 .size baz, 4
47baz:
48 .zero 4
49
50 .text
51.Ltext0:
52 .globl main
53 .type main, @function
54main:
55.LFB0:
56 .4byte 0
57.LFE0:
58 .size main, .-main
59.Letext0:
60
61 .section .debug_types,"",@progbits
62.Ldebug_types0:
63 .4byte .Ltu_end - .Ltu_start /* Length of Compilation Unit Info */
64.Ltu_start:
65 .2byte 0x4 /* DWARF version number */
66 .4byte .Ldebug_abbrev0 /* Offset Into Abbrev. Section */
67 .byte 0x4 /* Pointer Size (in bytes) */
68 .byte 0x19 /* Type Signature */
69 .byte 0x8b
70 .byte 0x7e
71 .byte 0xac
72 .byte 0xce
73 .byte 0xf1
74 .byte 0x22
75 .byte 0x90
76 .4byte .Ltu_class_type - .Ldebug_types0 /* Offset to Type DIE */
77 .uleb128 0x1 /* (DIE (0x17) DW_TAG_type_unit) */
78 .byte 0x4 /* DW_AT_language */
79 .byte 0x73 /* DW_AT_GNU_odr_signature */
80 .byte 0xea
81 .byte 0x85
82 .byte 0x23
83 .byte 0x75
84 .byte 0x8a
85 .byte 0x7e
86 .byte 0x87
87 .4byte .Ldebug_line0 /* DW_AT_stmt_list */
88
89 /* Manually inserted to have a DW_AT_specification refering to
90 something and appearing ahead of it. */
91 .uleb128 0x8 /* DW_TAG_class_type */
92 .4byte .Ltu_class_type - .Ldebug_types0
93 /* End of manual insertion */
94
95.Ltu_class_type:
96 .uleb128 0x2 /* (DIE (0x25) DW_TAG_class_type) */
97 .ascii "foo\0" /* DW_AT_name */
98 .byte 0x4 /* DW_AT_byte_size */
99 .byte 0x1 /* DW_AT_decl_file (pr13961.cc) */
100 .byte 0x1 /* DW_AT_decl_line */
101 .4byte 0x3f /* DW_AT_sibling */
102 .uleb128 0x3 /* (DIE (0x31) DW_TAG_member) */
103 .ascii "bar\0" /* DW_AT_name */
104 .byte 0x1 /* DW_AT_decl_file (pr13961.cc) */
105 .byte 0x4 /* DW_AT_decl_line */
106 .4byte 0x3f /* DW_AT_type */
107 .byte 0 /* DW_AT_data_member_location */
108 .byte 0x1 /* DW_AT_accessibility */
109 .byte 0 /* end of children of DIE 0x25 */
110 .uleb128 0x4 /* (DIE (0x3f) DW_TAG_base_type) */
111 .byte 0x4 /* DW_AT_byte_size */
112 .byte 0x5 /* DW_AT_encoding */
113 .ascii "int\0" /* DW_AT_name */
114 .byte 0 /* end of children of DIE 0x17 */
115
116.Ltu_end:
117
118 .section .debug_info,"",@progbits
119.Ldebug_info0:
120 .4byte .Lcu_end - .Lcu_start /* Length of Compilation Unit Info */
121.Lcu_start:
122 .2byte 0x4 /* DWARF version number */
123 .4byte .Ldebug_abbrev0 /* Offset Into Abbrev. Section */
124 .byte 0x4 /* Pointer Size (in bytes) */
125 .uleb128 0x5 /* (DIE (0xb) DW_TAG_compile_unit) */
126 .4byte .LASF0 /* DW_AT_producer: "GNU C++ 4.6.3 20120306" */
127 .byte 0x4 /* DW_AT_language */
128 .4byte .LASF1 /* DW_AT_name: "pr13961.cc" */
129 .4byte .LASF2 /* DW_AT_comp_dir: "." */
130 .4byte .Ltext0 /* DW_AT_low_pc */
131 .4byte .Letext0 /* DW_AT_high_pc */
132 .4byte .Ldebug_line0 /* DW_AT_stmt_list */
133.Lint_base_type:
134 .uleb128 0x4 /* (DIE (0x25) DW_TAG_base_type) */
135 .byte 0x4 /* DW_AT_byte_size */
136 .byte 0x5 /* DW_AT_encoding */
137 .ascii "int\0" /* DW_AT_name */
138 .uleb128 0x6 /* (DIE (0x2c) DW_TAG_subprogram) */
139 /* DW_AT_external */
140 .4byte .LASF3 /* DW_AT_name: "main" */
141 .byte 0x1 /* DW_AT_decl_file (pr13961.cc) */
142 .byte 0xa /* DW_AT_decl_line */
143 .4byte 0x25 /* DW_AT_type */
144 .4byte .LFB0 /* DW_AT_low_pc */
145 .4byte .LFE0 /* DW_AT_high_pc */
146 .uleb128 0x1 /* DW_AT_frame_base */
147 .byte 0x9c /* DW_OP_call_frame_cfa */
148 /* DW_AT_GNU_all_call_sites */
149 .uleb128 0x7 /* (DIE (0x41) DW_TAG_variable) */
150 .ascii "baz\0" /* DW_AT_name */
151 .byte 0x1 /* DW_AT_decl_file (pr13961.cc) */
152 .byte 0x7 /* DW_AT_decl_line */
153 .byte 0x19 /* DW_AT_type */
154 .byte 0x8b
155 .byte 0x7e
156 .byte 0xac
157 .byte 0xce
158 .byte 0xf1
159 .byte 0x22
160 .byte 0x90
161 /* DW_AT_external */
162 .uleb128 0x5 /* DW_AT_location */
163 .byte 0x3 /* DW_OP_addr */
164 .4byte baz
165
166 /* Manually inserted to have a DW_AT_specification refering to
167 something and appearing ahead of it. */
168 .uleb128 0x8 /* DW_TAG_class_type */
169 .4byte .Lcu_class_type - .Ldebug_info0 /* DW_AT_specification */
170
171.Lcu_int_type:
172 .uleb128 0x4 /* (DIE (0x3f) DW_TAG_base_type) */
173 .byte 0x4 /* DW_AT_byte_size */
174 .byte 0x5 /* DW_AT_encoding */
175 .ascii "int\0" /* DW_AT_name */
176.Lcu_class_type:
177 .uleb128 0x2 /* (DIE (0x25) DW_TAG_class_type) */
178 .ascii "foo2\0" /* DW_AT_name */
179 .byte 0x4 /* DW_AT_byte_size */
180 .byte 0x1 /* DW_AT_decl_file (pr13961.cc) */
181 .byte 0x1 /* DW_AT_decl_line */
182 .4byte 0x3f /* DW_AT_sibling */
183 .uleb128 0x3 /* (DIE (0x31) DW_TAG_member) */
184 .ascii "bar\0" /* DW_AT_name */
185 .byte 0x1 /* DW_AT_decl_file (pr13961.cc) */
186 .byte 0x4 /* DW_AT_decl_line */
187 .4byte .Lcu_int_type - .Ldebug_info0 /* DW_AT_type */
188 .byte 0 /* DW_AT_data_member_location */
189 .byte 0x1 /* DW_AT_accessibility */
190 .byte 0 /* end of children of DIE 0x25 */
191 .uleb128 0x4 /* (DIE (0x3f) DW_TAG_base_type) */
192 .byte 0x4 /* DW_AT_byte_size */
193 .byte 0x5 /* DW_AT_encoding */
194 .ascii "int\0" /* DW_AT_name */
195 .byte 0 /* end of children of DIE 0x17 */
196 /* End of manual insertion */
197
198 .byte 0 /* end of children of DIE 0xb */
199
200.Lcu_end:
201
202 .section .debug_abbrev,"",@progbits
203.Ldebug_abbrev0:
204 .uleb128 0x1 /* (abbrev code) */
205 .uleb128 0x41 /* (TAG: DW_TAG_type_unit) */
206 .byte 0x1 /* DW_children_yes */
207 .uleb128 0x13 /* (DW_AT_language) */
208 .uleb128 0xb /* (DW_FORM_data1) */
209 .uleb128 0x210f /* (DW_AT_GNU_odr_signature) */
210 .uleb128 0x7 /* (DW_FORM_data8) */
211 .uleb128 0x10 /* (DW_AT_stmt_list) */
212 .uleb128 0x17 /* (DW_FORM_sec_offset) */
213 .byte 0
214 .byte 0
215 .uleb128 0x2 /* (abbrev code) */
216 .uleb128 0x2 /* (TAG: DW_TAG_class_type) */
217 .byte 0x1 /* DW_children_yes */
218 .uleb128 0x3 /* (DW_AT_name) */
219 .uleb128 0x8 /* (DW_FORM_string) */
220 .uleb128 0xb /* (DW_AT_byte_size) */
221 .uleb128 0xb /* (DW_FORM_data1) */
222 .uleb128 0x3a /* (DW_AT_decl_file) */
223 .uleb128 0xb /* (DW_FORM_data1) */
224 .uleb128 0x3b /* (DW_AT_decl_line) */
225 .uleb128 0xb /* (DW_FORM_data1) */
226 .uleb128 0x1 /* (DW_AT_sibling) */
227 .uleb128 0x13 /* (DW_FORM_ref4) */
228 .byte 0
229 .byte 0
230 .uleb128 0x3 /* (abbrev code) */
231 .uleb128 0xd /* (TAG: DW_TAG_member) */
232 .byte 0 /* DW_children_no */
233 .uleb128 0x3 /* (DW_AT_name) */
234 .uleb128 0x8 /* (DW_FORM_string) */
235 .uleb128 0x3a /* (DW_AT_decl_file) */
236 .uleb128 0xb /* (DW_FORM_data1) */
237 .uleb128 0x3b /* (DW_AT_decl_line) */
238 .uleb128 0xb /* (DW_FORM_data1) */
239 .uleb128 0x49 /* (DW_AT_type) */
240 .uleb128 0x13 /* (DW_FORM_ref4) */
241 .uleb128 0x38 /* (DW_AT_data_member_location) */
242 .uleb128 0xb /* (DW_FORM_data1) */
243 .uleb128 0x32 /* (DW_AT_accessibility) */
244 .uleb128 0xb /* (DW_FORM_data1) */
245 .byte 0
246 .byte 0
247 .uleb128 0x4 /* (abbrev code) */
248 .uleb128 0x24 /* (TAG: DW_TAG_base_type) */
249 .byte 0 /* DW_children_no */
250 .uleb128 0xb /* (DW_AT_byte_size) */
251 .uleb128 0xb /* (DW_FORM_data1) */
252 .uleb128 0x3e /* (DW_AT_encoding) */
253 .uleb128 0xb /* (DW_FORM_data1) */
254 .uleb128 0x3 /* (DW_AT_name) */
255 .uleb128 0x8 /* (DW_FORM_string) */
256 .byte 0
257 .byte 0
258 .uleb128 0x5 /* (abbrev code) */
259 .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */
260 .byte 0x1 /* DW_children_yes */
261 .uleb128 0x25 /* (DW_AT_producer) */
262 .uleb128 0xe /* (DW_FORM_strp) */
263 .uleb128 0x13 /* (DW_AT_language) */
264 .uleb128 0xb /* (DW_FORM_data1) */
265 .uleb128 0x3 /* (DW_AT_name) */
266 .uleb128 0xe /* (DW_FORM_strp) */
267 .uleb128 0x1b /* (DW_AT_comp_dir) */
268 .uleb128 0xe /* (DW_FORM_strp) */
269 .uleb128 0x11 /* (DW_AT_low_pc) */
270 .uleb128 0x1 /* (DW_FORM_addr) */
271 .uleb128 0x12 /* (DW_AT_high_pc) */
272 .uleb128 0x1 /* (DW_FORM_addr) */
273 .uleb128 0x10 /* (DW_AT_stmt_list) */
274 .uleb128 0x17 /* (DW_FORM_sec_offset) */
275 .byte 0
276 .byte 0
277 .uleb128 0x6 /* (abbrev code) */
278 .uleb128 0x2e /* (TAG: DW_TAG_subprogram) */
279 .byte 0 /* DW_children_no */
280 .uleb128 0x3f /* (DW_AT_external) */
281 .uleb128 0x19 /* (DW_FORM_flag_present) */
282 .uleb128 0x3 /* (DW_AT_name) */
283 .uleb128 0xe /* (DW_FORM_strp) */
284 .uleb128 0x3a /* (DW_AT_decl_file) */
285 .uleb128 0xb /* (DW_FORM_data1) */
286 .uleb128 0x3b /* (DW_AT_decl_line) */
287 .uleb128 0xb /* (DW_FORM_data1) */
288 .uleb128 0x49 /* (DW_AT_type) */
289 .uleb128 0x13 /* (DW_FORM_ref4) */
290 .uleb128 0x11 /* (DW_AT_low_pc) */
291 .uleb128 0x1 /* (DW_FORM_addr) */
292 .uleb128 0x12 /* (DW_AT_high_pc) */
293 .uleb128 0x1 /* (DW_FORM_addr) */
294 .uleb128 0x40 /* (DW_AT_frame_base) */
295 .uleb128 0x18 /* (DW_FORM_exprloc) */
296 .uleb128 0x2117 /* (DW_AT_GNU_all_call_sites) */
297 .uleb128 0x19 /* (DW_FORM_flag_present) */
298 .byte 0
299 .byte 0
300 .uleb128 0x7 /* (abbrev code) */
301 .uleb128 0x34 /* (TAG: DW_TAG_variable) */
302 .byte 0 /* DW_children_no */
303 .uleb128 0x3 /* (DW_AT_name) */
304 .uleb128 0x8 /* (DW_FORM_string) */
305 .uleb128 0x3a /* (DW_AT_decl_file) */
306 .uleb128 0xb /* (DW_FORM_data1) */
307 .uleb128 0x3b /* (DW_AT_decl_line) */
308 .uleb128 0xb /* (DW_FORM_data1) */
309 .uleb128 0x49 /* (DW_AT_type) */
310 .uleb128 0x20 /* (DW_FORM_ref_sig8) */
311 .uleb128 0x3f /* (DW_AT_external) */
312 .uleb128 0x19 /* (DW_FORM_flag_present) */
313 .uleb128 0x2 /* (DW_AT_location) */
314 .uleb128 0x18 /* (DW_FORM_exprloc) */
315 .byte 0
316 .byte 0
317
318 /* Manually inserted. */
319 .uleb128 0x8 /* abbrev code */
320 .uleb128 0x2 /* DW_TAG_class_type */
321 .byte 0x0 /* DW_has_children_no */
322 .uleb128 0x47 /* DW_AT_specification */
323 .uleb128 0x13 /* DW_FORM_ref4 */
324 .byte 0x0 /* Terminator */
325 .byte 0x0 /* Terminator */
326 /* End of manual insertion. */
327
328 .byte 0
329
330 .section .debug_aranges,"",@progbits
331 .4byte 0x1c /* Length of Address Ranges Info */
332 .2byte 0x2 /* DWARF Version */
333 .4byte .Ldebug_info0 /* Offset of Compilation Unit Info */
334 .byte 0x4 /* Size of Address */
335 .byte 0 /* Size of Segment Descriptor */
336 .2byte 0 /* Pad to 8 byte boundary */
337 .2byte 0
338 .4byte .Ltext0 /* Address */
339 .4byte .Letext0-.Ltext0 /* Length */
340 .4byte 0
341 .4byte 0
342
343 .section .debug_line,"",@progbits
344.Ldebug_line0:
345
346 .section .debug_str,"MS",@progbits,1
347.LASF0:
348 .string "GNU C++ 4.6.3 20120306"
349.LASF2:
350 .string "."
351.LASF1:
352 .string "pr13961.cc"
353.LASF3:
354 .string "main"
355
This page took 0.036996 seconds and 4 git commands to generate.