PR threads/18127 - threads spawned by infcall end up stuck in "running" state
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / fission-reread.S
1 /* Copyright 2012-2015 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 for Fission.
17 http://gcc.gnu.org/wiki/DebugFission
18
19 Compiled from:
20
21 class foo
22 {
23 public:
24 int bar;
25 };
26
27 foo baz;
28
29 int
30 main ()
31 {
32 return 0;
33 }
34
35 And then manually edited to insert the necessary DW_AT_specification
36 entries to trigger the desired code path.
37 There's no real need to make this architecture-specific, so it has been
38 further hand-edited to support that.
39 */
40
41 .file "fission-reread.cc"
42
43 .globl baz
44 .data /* Previously this used .bss, but it's not portable. */
45 .align 4
46 .type baz, %object
47 .size baz, 4
48 baz:
49 .zero 4
50
51 .text
52 .Ltext0:
53 .globl main
54 .type main, %function
55 main:
56 .LFB0:
57 .file 1 "fission-reread.cc"
58 .loc 1 11 0
59 .4byte 0
60 .LFE0:
61 .size main, .-main
62 .Letext0:
63
64 .section .debug_types.dwo
65 .Ltu_start_dwo:
66 .4byte .Ltu_end_dwo - .Ltu_start_dwo - 4 /* Length of Compilation Unit Info */
67 .2byte 0x4 /* DWARF version number */
68 .4byte .Ldebug_abbrev0 /* Offset Into Abbrev. Section */
69 .byte 0x4 /* Pointer Size (in bytes) */
70 .byte 0x19 /* Type Signature */
71 .byte 0x8b
72 .byte 0x7e
73 .byte 0xac
74 .byte 0xce
75 .byte 0xf1
76 .byte 0x22
77 .byte 0x90
78 .4byte .Ltu_class_type - .Ltu_start_dwo /* Offset to Type DIE */
79 .uleb128 0x1 /* (DIE (0x17) DW_TAG_type_unit) */
80 .byte 0x4 /* DW_AT_language */
81 .byte 0x73 /* DW_AT_GNU_odr_signature */
82 .byte 0xea
83 .byte 0x85
84 .byte 0x23
85 .byte 0x75
86 .byte 0x8a
87 .byte 0x7e
88 .byte 0x87
89 .4byte .Lskeleton_debug_line0 /* DW_AT_stmt_list */
90
91 /* Manually inserted to have a DW_AT_specification refering to
92 something and appearing ahead of it. */
93 .uleb128 0x8 /* DW_TAG_class_type */
94 .4byte .Ltu_class_type - .Ltu_start_dwo
95 /* End of manual insertion */
96
97 .Ltu_class_type:
98 .uleb128 0x2 /* (DIE (0x25) DW_TAG_class_type) */
99 .ascii "foo\0" /* DW_AT_name */
100 .byte 0x4 /* DW_AT_byte_size */
101 .byte 0x1 /* DW_AT_decl_file (fission-reread.cc) */
102 .byte 0x1 /* DW_AT_decl_line */
103 .4byte .Ltu_int - .Ltu_start_dwo /* DW_AT_sibling */
104 .uleb128 0x3 /* (DIE (0x31) DW_TAG_member) */
105 .ascii "bar\0" /* DW_AT_name */
106 .byte 0x1 /* DW_AT_decl_file (fission-reread.cc) */
107 .byte 0x4 /* DW_AT_decl_line */
108 .4byte .Ltu_int - .Ltu_start_dwo /* DW_AT_type */
109 .byte 0 /* DW_AT_data_member_location */
110 .byte 0x1 /* DW_AT_accessibility */
111 .byte 0 /* end of children of DIE 0x25 */
112 .Ltu_int:
113 .uleb128 0x4 /* (DIE (0x3f) DW_TAG_base_type) */
114 .byte 0x4 /* DW_AT_byte_size */
115 .byte 0x5 /* DW_AT_encoding */
116 .ascii "int\0" /* DW_AT_name */
117 .byte 0 /* end of children of DIE 0x17 */
118 .Ltu_end_dwo:
119
120 .section .debug_types
121 .Ltu_start:
122 .4byte .Ltu_end - .Ltu_start - 4 /* Length of Type Unit Info */
123 .2byte 0x4 /* DWARF version number */
124 .4byte .Lskeleton_debug_abbrev0 /* Offset Into Abbrev. Section */
125 .byte 0x4 /* Pointer Size (in bytes) */
126 .byte 0x19 /* Type Signature */
127 .byte 0x8b
128 .byte 0x7e
129 .byte 0xac
130 .byte 0xce
131 .byte 0xf1
132 .byte 0x22
133 .byte 0x90
134 .4byte 0 /* Offset to Type DIE */
135 .uleb128 0x2 /* (DIE (0) DW_TAG_type_unit) */
136 .ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */
137 .ascii "fission-reread.dwo\0" /* DW_AT_GNU_dwo_name */
138 .4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
139 .4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
140 .4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
141 .Ltu_end:
142
143 .section .debug_info.dwo
144 .Lcu_start_dwo:
145 .4byte .Lcu_end_dwo - .Lcu_start_dwo - 4 /* Length of Compilation Unit Info */
146 .2byte 0x4 /* DWARF version number */
147 .4byte .Ldebug_abbrev0 /* Offset Into Abbrev. Section */
148 .byte 0x4 /* Pointer Size (in bytes) */
149 .uleb128 0x5 /* (DIE (0xb) DW_TAG_compile_unit) */
150 .ascii "GNU C++ 4.6.x-fission\0" /* DW_AT_producer */
151 .byte 0x4 /* DW_AT_language */
152 .ascii "gdb.dwarf2/fission-reread.cc\0" /* DW_AT_name */
153 .ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */
154 .byte 1 /* DW_AT_GNU_dwo_id */
155 .byte 2
156 .byte 3
157 .byte 4
158 .byte 5
159 .byte 6
160 .byte 7
161 .byte 8
162 .Lcu_int:
163 .uleb128 0x4 /* (DIE (0x7f) DW_TAG_base_type) */
164 .byte 0x4 /* DW_AT_byte_size */
165 .byte 0x5 /* DW_AT_encoding */
166 .ascii "int\0" /* DW_AT_name */
167 .uleb128 0x6 /* (DIE (0x86) DW_TAG_subprogram) */
168 /* DW_AT_external */
169 .ascii "main\0" /* DW_AT_name */
170 .byte 0x1 /* DW_AT_decl_file (fission-reread.cc) */
171 .byte 0xa /* DW_AT_decl_line */
172 .4byte .Lcu_int - .Lcu_start_dwo /* DW_AT_type */
173 .uleb128 0 /* DW_AT_low_pc */
174 .4byte .LFE0-.LFB0 /* DW_AT_high_pc */
175 .uleb128 0x1 /* DW_AT_frame_base */
176 .byte 0x9c /* DW_OP_call_frame_cfa */
177 .uleb128 0x7 /* (DIE (0x9d) DW_TAG_variable) */
178 .ascii "baz\0" /* DW_AT_name */
179 .byte 0x1 /* DW_AT_decl_file (fission-reread.cc) */
180 .byte 0x7 /* DW_AT_decl_line */
181 .byte 0x19 /* DW_AT_type */
182 .byte 0x8b
183 .byte 0x7e
184 .byte 0xac
185 .byte 0xce
186 .byte 0xf1
187 .byte 0x22
188 .byte 0x90
189 /* DW_AT_external */
190 .uleb128 0x2 /* DW_AT_location */
191 .byte 0xfb /* DW_OP_GNU_addr_index */
192 .uleb128 0x1 /* (index into .debug_addr) */
193 .byte 0 /* end of children of DIE 0xb */
194 .Lcu_end_dwo:
195
196 .section .debug_info
197 .Lskeleton_debug_info0:
198 .Lcu_start:
199 .4byte .Lcu_end - .Lcu_start - 4 /* Length of Compilation Unit Info */
200 .2byte 0x4 /* DWARF version number */
201 .4byte .Lskeleton_debug_abbrev0 /* Offset Into Abbrev. Section */
202 .byte 0x4 /* Pointer Size (in bytes) */
203 .uleb128 0x1 /* (DIE (0) DW_TAG_compile_unit) */
204 .4byte .Ltext0 /* DW_AT_low_pc */
205 .4byte .Letext0-.Ltext0 /* DW_AT_high_pc */
206 .4byte .Ldebug_line0 /* DW_AT_stmt_list */
207 .ascii "/tmp/src/gdb/testsuite\0" /* DW_AT_comp_dir */
208 .ascii "fission-reread.dwo\0" /* DW_AT_GNU_dwo_name */
209 .4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
210 .4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
211 .4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
212 .byte 1 /* DW_AT_GNU_dwo_id */
213 .byte 2
214 .byte 3
215 .byte 4
216 .byte 5
217 .byte 6
218 .byte 7
219 .byte 8
220 .Lcu_end:
221
222 .section .debug_abbrev
223 .Lskeleton_debug_abbrev0:
224 .uleb128 0x1 /* (abbrev code) */
225 .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */
226 .byte 0 /* DW_children_no */
227 .uleb128 0x11 /* (DW_AT_low_pc) */
228 .uleb128 0x1 /* (DW_FORM_addr) */
229 .uleb128 0x12 /* (DW_AT_high_pc) */
230 .uleb128 0x6 /* (DW_FORM_data4) */
231 .uleb128 0x10 /* (DW_AT_stmt_list) */
232 .uleb128 0x17 /* (DW_FORM_sec_offset) */
233 .uleb128 0x1b /* (DW_AT_comp_dir) */
234 .uleb128 0x8 /* (DW_FORM_string) */
235 .uleb128 0x2130 /* (DW_AT_GNU_dwo_name) */
236 .uleb128 0x8 /* (DW_FORM_string) */
237 .uleb128 0x2134 /* (DW_AT_GNU_pubnames) */
238 .uleb128 0x17 /* (DW_FORM_sec_offset) */
239 .uleb128 0x2135 /* (DW_AT_GNU_pubtypes) */
240 .uleb128 0x17 /* (DW_FORM_sec_offset) */
241 .uleb128 0x2133 /* (DW_AT_GNU_addr_base) */
242 .uleb128 0x17 /* (DW_FORM_sec_offset) */
243 .uleb128 0x2131 /* (DW_AT_GNU_dwo_id) */
244 .uleb128 0x7 /* (DW_FORM_data8) */
245 .byte 0
246 .byte 0
247 .uleb128 0x2 /* (abbrev code) */
248 .uleb128 0x41 /* (TAG: DW_TAG_type_unit) */
249 .byte 0 /* DW_children_no */
250 .uleb128 0x1b /* (DW_AT_comp_dir) */
251 .uleb128 0x8 /* (DW_FORM_string) */
252 .uleb128 0x2130 /* (DW_AT_GNU_dwo_name) */
253 .uleb128 0x8 /* (DW_FORM_string) */
254 .uleb128 0x2134 /* (DW_AT_GNU_pubnames) */
255 .uleb128 0x17 /* (DW_FORM_sec_offset) */
256 .uleb128 0x2135 /* (DW_AT_GNU_pubtypes) */
257 .uleb128 0x17 /* (DW_FORM_sec_offset) */
258 .uleb128 0x2133 /* (DW_AT_GNU_addr_base) */
259 .uleb128 0x17 /* (DW_FORM_sec_offset) */
260 .byte 0
261 .byte 0
262 .byte 0 /* end of skeleton .debug_abbrev */
263 .section .debug_abbrev.dwo
264 .Ldebug_abbrev0:
265 .uleb128 0x1 /* (abbrev code) */
266 .uleb128 0x41 /* (TAG: DW_TAG_type_unit) */
267 .byte 0x1 /* DW_children_yes */
268 .uleb128 0x13 /* (DW_AT_language) */
269 .uleb128 0xb /* (DW_FORM_data1) */
270 .uleb128 0x210f /* (DW_AT_GNU_odr_signature) */
271 .uleb128 0x7 /* (DW_FORM_data8) */
272 .uleb128 0x10 /* (DW_AT_stmt_list) */
273 .uleb128 0x17 /* (DW_FORM_sec_offset) */
274 .byte 0
275 .byte 0
276 .uleb128 0x2 /* (abbrev code) */
277 .uleb128 0x2 /* (TAG: DW_TAG_class_type) */
278 .byte 0x1 /* DW_children_yes */
279 .uleb128 0x3 /* (DW_AT_name) */
280 .uleb128 0x8 /* (DW_FORM_string) */
281 .uleb128 0xb /* (DW_AT_byte_size) */
282 .uleb128 0xb /* (DW_FORM_data1) */
283 .uleb128 0x3a /* (DW_AT_decl_file) */
284 .uleb128 0xb /* (DW_FORM_data1) */
285 .uleb128 0x3b /* (DW_AT_decl_line) */
286 .uleb128 0xb /* (DW_FORM_data1) */
287 .uleb128 0x1 /* (DW_AT_sibling) */
288 .uleb128 0x13 /* (DW_FORM_ref4) */
289 .byte 0
290 .byte 0
291 .uleb128 0x3 /* (abbrev code) */
292 .uleb128 0xd /* (TAG: DW_TAG_member) */
293 .byte 0 /* DW_children_no */
294 .uleb128 0x3 /* (DW_AT_name) */
295 .uleb128 0x8 /* (DW_FORM_string) */
296 .uleb128 0x3a /* (DW_AT_decl_file) */
297 .uleb128 0xb /* (DW_FORM_data1) */
298 .uleb128 0x3b /* (DW_AT_decl_line) */
299 .uleb128 0xb /* (DW_FORM_data1) */
300 .uleb128 0x49 /* (DW_AT_type) */
301 .uleb128 0x13 /* (DW_FORM_ref4) */
302 .uleb128 0x38 /* (DW_AT_data_member_location) */
303 .uleb128 0xb /* (DW_FORM_data1) */
304 .uleb128 0x32 /* (DW_AT_accessibility) */
305 .uleb128 0xb /* (DW_FORM_data1) */
306 .byte 0
307 .byte 0
308 .uleb128 0x4 /* (abbrev code) */
309 .uleb128 0x24 /* (TAG: DW_TAG_base_type) */
310 .byte 0 /* DW_children_no */
311 .uleb128 0xb /* (DW_AT_byte_size) */
312 .uleb128 0xb /* (DW_FORM_data1) */
313 .uleb128 0x3e /* (DW_AT_encoding) */
314 .uleb128 0xb /* (DW_FORM_data1) */
315 .uleb128 0x3 /* (DW_AT_name) */
316 .uleb128 0x8 /* (DW_FORM_string) */
317 .byte 0
318 .byte 0
319 .uleb128 0x5 /* (abbrev code) */
320 .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */
321 .byte 0x1 /* DW_children_yes */
322 .uleb128 0x25 /* (DW_AT_producer) */
323 .uleb128 0x8 /* (DW_FORM_string) */
324 .uleb128 0x13 /* (DW_AT_language) */
325 .uleb128 0xb /* (DW_FORM_data1) */
326 .uleb128 0x3 /* (DW_AT_name) */
327 .uleb128 0x8 /* (DW_FORM_string) */
328 .uleb128 0x1b /* (DW_AT_comp_dir) */
329 .uleb128 0x8 /* (DW_FORM_string) */
330 .uleb128 0x2131 /* (DW_AT_GNU_dwo_id) */
331 .uleb128 0x7 /* (DW_FORM_data8) */
332 .byte 0
333 .byte 0
334 .uleb128 0x6 /* (abbrev code) */
335 .uleb128 0x2e /* (TAG: DW_TAG_subprogram) */
336 .byte 0 /* DW_children_no */
337 .uleb128 0x3f /* (DW_AT_external) */
338 .uleb128 0x19 /* (DW_FORM_flag_present) */
339 .uleb128 0x3 /* (DW_AT_name) */
340 .uleb128 0x8 /* (DW_FORM_string) */
341 .uleb128 0x3a /* (DW_AT_decl_file) */
342 .uleb128 0xb /* (DW_FORM_data1) */
343 .uleb128 0x3b /* (DW_AT_decl_line) */
344 .uleb128 0xb /* (DW_FORM_data1) */
345 .uleb128 0x49 /* (DW_AT_type) */
346 .uleb128 0x13 /* (DW_FORM_ref4) */
347 .uleb128 0x11 /* (DW_AT_low_pc) */
348 .uleb128 0x1f01 /* (DW_FORM_GNU_addr_index) */
349 .uleb128 0x12 /* (DW_AT_high_pc) */
350 .uleb128 0x6 /* (DW_FORM_data4) */
351 .uleb128 0x40 /* (DW_AT_frame_base) */
352 .uleb128 0x18 /* (DW_FORM_exprloc) */
353 .byte 0
354 .byte 0
355 .uleb128 0x7 /* (abbrev code) */
356 .uleb128 0x34 /* (TAG: DW_TAG_variable) */
357 .byte 0 /* DW_children_no */
358 .uleb128 0x3 /* (DW_AT_name) */
359 .uleb128 0x8 /* (DW_FORM_string) */
360 .uleb128 0x3a /* (DW_AT_decl_file) */
361 .uleb128 0xb /* (DW_FORM_data1) */
362 .uleb128 0x3b /* (DW_AT_decl_line) */
363 .uleb128 0xb /* (DW_FORM_data1) */
364 .uleb128 0x49 /* (DW_AT_type) */
365 .uleb128 0x20 /* (DW_FORM_ref_sig8) */
366 .uleb128 0x3f /* (DW_AT_external) */
367 .uleb128 0x19 /* (DW_FORM_flag_present) */
368 .uleb128 0x2 /* (DW_AT_location) */
369 .uleb128 0x18 /* (DW_FORM_exprloc) */
370 .byte 0
371 .byte 0
372
373 /* Manually inserted. */
374 .uleb128 0x8 /* abbrev code */
375 .uleb128 0x2 /* DW_TAG_class_type */
376 .byte 0x0 /* DW_has_children_no */
377 .uleb128 0x47 /* DW_AT_specification */
378 .uleb128 0x13 /* DW_FORM_ref4 */
379 .byte 0x0 /* Terminator */
380 .byte 0x0 /* Terminator */
381 /* End of manual insertion. */
382
383 .byte 0
384 .section .debug_pubnames
385 .Ldebug_pubnames0:
386 .4byte 0x1f /* Length of Public Names Info */
387 .2byte 0x2 /* DWARF Version */
388 .4byte .Lskeleton_debug_info0 /* Offset of Compilation Unit Info */
389 .4byte 0xb0 /* Compilation Unit Length */
390 .4byte 0x86 /* DIE offset */
391 .ascii "main\0" /* external name */
392 .4byte 0x9d /* DIE offset */
393 .ascii "baz\0" /* external name */
394 .4byte 0
395 .section .debug_pubtypes
396 .Ldebug_pubtypes0:
397 .4byte 0x1e /* Length of Public Type Names Info */
398 .2byte 0x2 /* DWARF Version */
399 .4byte .Lskeleton_debug_info0 /* Offset of Compilation Unit Info */
400 .4byte 0xb0 /* Compilation Unit Length */
401 .4byte 0x7f /* DIE offset */
402 .ascii "int\0" /* external name */
403 .4byte 0x25 /* DIE offset */
404 .ascii "foo\0" /* external name */
405 .4byte 0
406 .section .debug_aranges
407 .4byte 0x1c /* Length of Address Ranges Info */
408 .2byte 0x2 /* DWARF Version */
409 .4byte .Lskeleton_debug_info0 /* Offset of Compilation Unit Info */
410 .byte 0x4 /* Size of Address */
411 .byte 0 /* Size of Segment Descriptor */
412 .2byte 0 /* Pad to 16 byte boundary */
413 .2byte 0
414 .4byte .Ltext0 /* Address */
415 .4byte .Letext0-.Ltext0 /* Length */
416 .4byte 0
417 .4byte 0
418 .section .debug_line
419 .Ldebug_line0:
420 .section .debug_line.dwo
421 .Lskeleton_debug_line0:
422 .4byte .LELT0-.LSLT0 /* Length of Source Line Info */
423 .LSLT0:
424 .2byte 0x4 /* DWARF Version */
425 .4byte .LELTP0-.LASLTP0 /* Prolog Length */
426 .LASLTP0:
427 .byte 0x1 /* Minimum Instruction Length */
428 .byte 0x1 /* Maximum Operations Per Instruction */
429 .byte 0x1 /* Default is_stmt_start flag */
430 .byte 0xf6 /* Line Base Value (Special Opcodes) */
431 .byte 0xf5 /* Line Range Value (Special Opcodes) */
432 .byte 0xa /* Special Opcode Base */
433 .byte 0 /* opcode: 0x1 has 0 args */
434 .byte 0x1 /* opcode: 0x2 has 1 args */
435 .byte 0x1 /* opcode: 0x3 has 1 args */
436 .byte 0x1 /* opcode: 0x4 has 1 args */
437 .byte 0x1 /* opcode: 0x5 has 1 args */
438 .byte 0 /* opcode: 0x6 has 0 args */
439 .byte 0 /* opcode: 0x7 has 0 args */
440 .byte 0 /* opcode: 0x8 has 0 args */
441 .byte 0x1 /* opcode: 0x9 has 1 args */
442 .byte 0 /* End directory table */
443 .ascii "fission-reread.cc\0" /* File Entry: 0x1 */
444 .uleb128 0
445 .uleb128 0
446 .uleb128 0
447 .byte 0 /* End file name table */
448 .LELTP0:
449 .LELT0:
450 .section .debug_addr
451 .Ldebug_addr0:
452 .4byte .LFB0 /* DW_AT_low_pc */
453 .4byte baz /* DW_AT_location */
This page took 0.077167 seconds and 4 git commands to generate.