*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.dwarf2 / fission-reread.S
CommitLineData
42e7ad6c
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 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 .bss
45 .align 4
46 .type baz, @object
47 .size baz, 4
48baz:
49 .zero 4
50
51 .text
52.Ltext0:
53 .globl main
54 .type main, @function
55main:
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
08a67be6 64 .section .debug_types.dwo
42e7ad6c 65.Ltu_start_dwo:
0f3c2347
JK
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 */
42e7ad6c
DE
71 .byte 0x8b
72 .byte 0x7e
73 .byte 0xac
74 .byte 0xce
75 .byte 0xf1
76 .byte 0x22
77 .byte 0x90
0f3c2347
JK
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 */
42e7ad6c
DE
82 .byte 0xea
83 .byte 0x85
84 .byte 0x23
85 .byte 0x75
86 .byte 0x8a
87 .byte 0x7e
88 .byte 0x87
0f3c2347 89 .4byte .Lskeleton_debug_line0 /* DW_AT_stmt_list */
42e7ad6c
DE
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:
0f3c2347
JK
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 /* 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 /* 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 */
42e7ad6c 112.Ltu_int:
0f3c2347
JK
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 */
42e7ad6c
DE
118.Ltu_end_dwo:
119
08a67be6 120 .section .debug_types
42e7ad6c 121.Ltu_start:
0f3c2347
JK
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 */
42e7ad6c
DE
127 .byte 0x8b
128 .byte 0x7e
129 .byte 0xac
130 .byte 0xce
131 .byte 0xf1
132 .byte 0x22
133 .byte 0x90
0f3c2347
JK
134 .4byte 0 /* Offset to Type DIE */
135 .uleb128 0x2 /* (DIE (0) DW_TAG_type_unit) */
136 .ascii "/tmp/src/gdb/testsuite/gdb.dwarf2\0" /* DW_AT_comp_dir */
137 /* Normally dwo_name would be "fission-reread.dwo". */
138 /* Simplification: Leave the DWO contents in the executable. */
139 .ascii "fission-reread\0" /* DW_AT_GNU_dwo_name */
140 .4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
141 .4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
142 .4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
42e7ad6c
DE
143.Ltu_end:
144
08a67be6 145 .section .debug_info.dwo
42e7ad6c 146.Lcu_start_dwo:
0f3c2347
JK
147 .4byte .Lcu_end_dwo - .Lcu_start_dwo - 4 /* Length of Compilation Unit Info */
148 .2byte 0x4 /* DWARF version number */
149 .4byte .Ldebug_abbrev0 /* Offset Into Abbrev. Section */
150 .byte 0x4 /* Pointer Size (in bytes) */
151 .uleb128 0x5 /* (DIE (0xb) DW_TAG_compile_unit) */
152 .ascii "GNU C++ 4.6.x-fission\0" /* DW_AT_producer */
153 .byte 0x4 /* DW_AT_language */
154 .ascii "fission-reread.cc\0" /* DW_AT_name */
155 .ascii "/tmp/src/gdb/testsuite/gdb.dwarf2\0" /* DW_AT_comp_dir */
156 .byte 0 /* DW_AT_GNU_dwo_id */
42e7ad6c
DE
157 .byte 0
158 .byte 0
159 .byte 0
160 .byte 0
161 .byte 0
162 .byte 0
163 .byte 0
164.Lcu_int:
0f3c2347
JK
165 .uleb128 0x4 /* (DIE (0x7f) DW_TAG_base_type) */
166 .byte 0x4 /* DW_AT_byte_size */
167 .byte 0x5 /* DW_AT_encoding */
168 .ascii "int\0" /* DW_AT_name */
169 .uleb128 0x6 /* (DIE (0x86) DW_TAG_subprogram) */
170 /* DW_AT_external */
171 .ascii "main\0" /* DW_AT_name */
172 .byte 0x1 /* DW_AT_decl_file (fission-reread.cc) */
173 .byte 0xa /* DW_AT_decl_line */
174 .4byte .Lcu_int /* DW_AT_type */
175 .uleb128 0 /* DW_AT_low_pc */
176 .4byte .LFE0-.LFB0 /* DW_AT_high_pc */
177 .uleb128 0x1 /* DW_AT_frame_base */
178 .byte 0x9c /* DW_OP_call_frame_cfa */
179 .uleb128 0x7 /* (DIE (0x9d) DW_TAG_variable) */
180 .ascii "baz\0" /* DW_AT_name */
181 .byte 0x1 /* DW_AT_decl_file (fission-reread.cc) */
182 .byte 0x7 /* DW_AT_decl_line */
183 .byte 0x19 /* DW_AT_type */
42e7ad6c
DE
184 .byte 0x8b
185 .byte 0x7e
186 .byte 0xac
187 .byte 0xce
188 .byte 0xf1
189 .byte 0x22
190 .byte 0x90
0f3c2347
JK
191 /* DW_AT_external */
192 .uleb128 0x2 /* DW_AT_location */
193 .byte 0xfb /* DW_OP_GNU_addr_index */
194 .uleb128 0x1 /* (index into .debug_addr) */
195 .byte 0 /* end of children of DIE 0xb */
42e7ad6c
DE
196.Lcu_end_dwo:
197
08a67be6 198 .section .debug_info
42e7ad6c
DE
199.Lskeleton_debug_info0:
200.Lcu_start:
0f3c2347
JK
201 .4byte .Lcu_end - .Lcu_start - 4 /* Length of Compilation Unit Info */
202 .2byte 0x4 /* DWARF version number */
203 .4byte .Lskeleton_debug_abbrev0 /* Offset Into Abbrev. Section */
204 .byte 0x4 /* Pointer Size (in bytes) */
205 .uleb128 0x1 /* (DIE (0) DW_TAG_compile_unit) */
206 .4byte .Ltext0 /* DW_AT_low_pc */
207 .4byte .Letext0-.Ltext0 /* DW_AT_high_pc */
208 .4byte .Ldebug_line0 /* DW_AT_stmt_list */
209 .ascii "/tmp/src/gdb/testsuite/gdb.dwarf2\0" /* DW_AT_comp_dir */
210 /* Normally dwo_name would be "fission-reread.dwo". */
211 /* Simplification: Leave the DWO contents in the executable. */
212 .ascii "fission-reread\0" /* DW_AT_GNU_dwo_name */
213 .4byte .Ldebug_pubnames0 /* DW_AT_GNU_pubnames */
214 .4byte .Ldebug_pubtypes0 /* DW_AT_GNU_pubtypes */
215 .4byte .Ldebug_addr0 /* DW_AT_GNU_addr_base */
216 .byte 0 /* DW_AT_GNU_dwo_id */
42e7ad6c
DE
217 .byte 0
218 .byte 0
219 .byte 0
220 .byte 0
221 .byte 0
222 .byte 0
223 .byte 0
224.Lcu_end:
225
08a67be6 226 .section .debug_abbrev
42e7ad6c 227.Lskeleton_debug_abbrev0:
0f3c2347
JK
228 .uleb128 0x1 /* (abbrev code) */
229 .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */
230 .byte 0 /* DW_children_no */
231 .uleb128 0x11 /* (DW_AT_low_pc) */
232 .uleb128 0x1 /* (DW_FORM_addr) */
233 .uleb128 0x12 /* (DW_AT_high_pc) */
234 .uleb128 0x7 /* (DW_FORM_data8) */
235 .uleb128 0x10 /* (DW_AT_stmt_list) */
236 .uleb128 0x17 /* (DW_FORM_sec_offset) */
237 .uleb128 0x1b /* (DW_AT_comp_dir) */
238 .uleb128 0x8 /* (DW_FORM_string) */
239 .uleb128 0x2130 /* (DW_AT_GNU_dwo_name) */
240 .uleb128 0x8 /* (DW_FORM_string) */
241 .uleb128 0x2134 /* (DW_AT_GNU_pubnames) */
242 .uleb128 0x17 /* (DW_FORM_sec_offset) */
243 .uleb128 0x2135 /* (DW_AT_GNU_pubtypes) */
244 .uleb128 0x17 /* (DW_FORM_sec_offset) */
245 .uleb128 0x2133 /* (DW_AT_GNU_addr_base) */
246 .uleb128 0x17 /* (DW_FORM_sec_offset) */
247 .uleb128 0x2131 /* (DW_AT_GNU_dwo_id) */
248 .uleb128 0x7 /* (DW_FORM_data8) */
249 .byte 0
250 .byte 0
251 .uleb128 0x2 /* (abbrev code) */
252 .uleb128 0x41 /* (TAG: DW_TAG_type_unit) */
253 .byte 0 /* DW_children_no */
254 .uleb128 0x1b /* (DW_AT_comp_dir) */
255 .uleb128 0x8 /* (DW_FORM_string) */
256 .uleb128 0x2130 /* (DW_AT_GNU_dwo_name) */
257 .uleb128 0x8 /* (DW_FORM_string) */
258 .uleb128 0x2134 /* (DW_AT_GNU_pubnames) */
259 .uleb128 0x17 /* (DW_FORM_sec_offset) */
260 .uleb128 0x2135 /* (DW_AT_GNU_pubtypes) */
261 .uleb128 0x17 /* (DW_FORM_sec_offset) */
262 .uleb128 0x2133 /* (DW_AT_GNU_addr_base) */
263 .uleb128 0x17 /* (DW_FORM_sec_offset) */
264 .byte 0
265 .byte 0
266 .byte 0 /* end of skeleton .debug_abbrev */
08a67be6 267 .section .debug_abbrev.dwo
42e7ad6c 268.Ldebug_abbrev0:
0f3c2347
JK
269 .uleb128 0x1 /* (abbrev code) */
270 .uleb128 0x41 /* (TAG: DW_TAG_type_unit) */
271 .byte 0x1 /* DW_children_yes */
272 .uleb128 0x13 /* (DW_AT_language) */
273 .uleb128 0xb /* (DW_FORM_data1) */
274 .uleb128 0x210f /* (DW_AT_GNU_odr_signature) */
275 .uleb128 0x7 /* (DW_FORM_data8) */
276 .uleb128 0x10 /* (DW_AT_stmt_list) */
277 .uleb128 0x17 /* (DW_FORM_sec_offset) */
278 .byte 0
279 .byte 0
280 .uleb128 0x2 /* (abbrev code) */
281 .uleb128 0x2 /* (TAG: DW_TAG_class_type) */
282 .byte 0x1 /* DW_children_yes */
283 .uleb128 0x3 /* (DW_AT_name) */
284 .uleb128 0x8 /* (DW_FORM_string) */
285 .uleb128 0xb /* (DW_AT_byte_size) */
286 .uleb128 0xb /* (DW_FORM_data1) */
287 .uleb128 0x3a /* (DW_AT_decl_file) */
288 .uleb128 0xb /* (DW_FORM_data1) */
289 .uleb128 0x3b /* (DW_AT_decl_line) */
290 .uleb128 0xb /* (DW_FORM_data1) */
291 .uleb128 0x1 /* (DW_AT_sibling) */
292 .uleb128 0x13 /* (DW_FORM_ref4) */
293 .byte 0
294 .byte 0
295 .uleb128 0x3 /* (abbrev code) */
296 .uleb128 0xd /* (TAG: DW_TAG_member) */
297 .byte 0 /* DW_children_no */
298 .uleb128 0x3 /* (DW_AT_name) */
299 .uleb128 0x8 /* (DW_FORM_string) */
300 .uleb128 0x3a /* (DW_AT_decl_file) */
301 .uleb128 0xb /* (DW_FORM_data1) */
302 .uleb128 0x3b /* (DW_AT_decl_line) */
303 .uleb128 0xb /* (DW_FORM_data1) */
304 .uleb128 0x49 /* (DW_AT_type) */
305 .uleb128 0x13 /* (DW_FORM_ref4) */
306 .uleb128 0x38 /* (DW_AT_data_member_location) */
307 .uleb128 0xb /* (DW_FORM_data1) */
308 .uleb128 0x32 /* (DW_AT_accessibility) */
309 .uleb128 0xb /* (DW_FORM_data1) */
310 .byte 0
311 .byte 0
312 .uleb128 0x4 /* (abbrev code) */
313 .uleb128 0x24 /* (TAG: DW_TAG_base_type) */
314 .byte 0 /* DW_children_no */
315 .uleb128 0xb /* (DW_AT_byte_size) */
316 .uleb128 0xb /* (DW_FORM_data1) */
317 .uleb128 0x3e /* (DW_AT_encoding) */
318 .uleb128 0xb /* (DW_FORM_data1) */
319 .uleb128 0x3 /* (DW_AT_name) */
320 .uleb128 0x8 /* (DW_FORM_string) */
321 .byte 0
322 .byte 0
323 .uleb128 0x5 /* (abbrev code) */
324 .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */
325 .byte 0x1 /* DW_children_yes */
326 .uleb128 0x25 /* (DW_AT_producer) */
327 .uleb128 0x8 /* (DW_FORM_string) */
328 .uleb128 0x13 /* (DW_AT_language) */
329 .uleb128 0xb /* (DW_FORM_data1) */
330 .uleb128 0x3 /* (DW_AT_name) */
331 .uleb128 0x8 /* (DW_FORM_string) */
332 .uleb128 0x1b /* (DW_AT_comp_dir) */
333 .uleb128 0x8 /* (DW_FORM_string) */
334 .uleb128 0x2131 /* (DW_AT_GNU_dwo_id) */
335 .uleb128 0x7 /* (DW_FORM_data8) */
336 .byte 0
337 .byte 0
338 .uleb128 0x6 /* (abbrev code) */
339 .uleb128 0x2e /* (TAG: DW_TAG_subprogram) */
340 .byte 0 /* DW_children_no */
341 .uleb128 0x3f /* (DW_AT_external) */
342 .uleb128 0x19 /* (DW_FORM_flag_present) */
343 .uleb128 0x3 /* (DW_AT_name) */
344 .uleb128 0x8 /* (DW_FORM_string) */
345 .uleb128 0x3a /* (DW_AT_decl_file) */
346 .uleb128 0xb /* (DW_FORM_data1) */
347 .uleb128 0x3b /* (DW_AT_decl_line) */
348 .uleb128 0xb /* (DW_FORM_data1) */
349 .uleb128 0x49 /* (DW_AT_type) */
350 .uleb128 0x13 /* (DW_FORM_ref4) */
351 .uleb128 0x11 /* (DW_AT_low_pc) */
352 .uleb128 0x1f01 /* (DW_FORM_GNU_addr_index) */
353 .uleb128 0x12 /* (DW_AT_high_pc) */
354 .uleb128 0x7 /* (DW_FORM_data8) */
355 .uleb128 0x40 /* (DW_AT_frame_base) */
356 .uleb128 0x18 /* (DW_FORM_exprloc) */
357 .byte 0
358 .byte 0
359 .uleb128 0x7 /* (abbrev code) */
360 .uleb128 0x34 /* (TAG: DW_TAG_variable) */
361 .byte 0 /* DW_children_no */
362 .uleb128 0x3 /* (DW_AT_name) */
363 .uleb128 0x8 /* (DW_FORM_string) */
364 .uleb128 0x3a /* (DW_AT_decl_file) */
365 .uleb128 0xb /* (DW_FORM_data1) */
366 .uleb128 0x3b /* (DW_AT_decl_line) */
367 .uleb128 0xb /* (DW_FORM_data1) */
368 .uleb128 0x49 /* (DW_AT_type) */
369 .uleb128 0x20 /* (DW_FORM_ref_sig8) */
370 .uleb128 0x3f /* (DW_AT_external) */
371 .uleb128 0x19 /* (DW_FORM_flag_present) */
372 .uleb128 0x2 /* (DW_AT_location) */
373 .uleb128 0x18 /* (DW_FORM_exprloc) */
42e7ad6c
DE
374 .byte 0
375 .byte 0
376
377 /* Manually inserted. */
378 .uleb128 0x8 /* abbrev code */
379 .uleb128 0x2 /* DW_TAG_class_type */
380 .byte 0x0 /* DW_has_children_no */
381 .uleb128 0x47 /* DW_AT_specification */
382 .uleb128 0x13 /* DW_FORM_ref4 */
383 .byte 0x0 /* Terminator */
384 .byte 0x0 /* Terminator */
385 /* End of manual insertion. */
386
387 .byte 0
08a67be6 388 .section .debug_pubnames
42e7ad6c 389.Ldebug_pubnames0:
0f3c2347
JK
390 .4byte 0x1f /* Length of Public Names Info */
391 .2byte 0x2 /* DWARF Version */
392 .4byte .Lskeleton_debug_info0 /* Offset of Compilation Unit Info */
393 .4byte 0xb0 /* Compilation Unit Length */
394 .4byte 0x86 /* DIE offset */
395 .ascii "main\0" /* external name */
396 .4byte 0x9d /* DIE offset */
397 .ascii "baz\0" /* external name */
42e7ad6c 398 .4byte 0
08a67be6 399 .section .debug_pubtypes
42e7ad6c 400.Ldebug_pubtypes0:
0f3c2347
JK
401 .4byte 0x1e /* Length of Public Type Names Info */
402 .2byte 0x2 /* DWARF Version */
403 .4byte .Lskeleton_debug_info0 /* Offset of Compilation Unit Info */
404 .4byte 0xb0 /* Compilation Unit Length */
405 .4byte 0x7f /* DIE offset */
406 .ascii "int\0" /* external name */
407 .4byte 0x25 /* DIE offset */
408 .ascii "foo\0" /* external name */
42e7ad6c 409 .4byte 0
08a67be6 410 .section .debug_aranges
0f3c2347
JK
411 .4byte 0x2c /* Length of Address Ranges Info */
412 .2byte 0x2 /* DWARF Version */
413 .4byte .Lskeleton_debug_info0 /* Offset of Compilation Unit Info */
414 .byte 0x8 /* Size of Address */
415 .byte 0 /* Size of Segment Descriptor */
416 .2byte 0 /* Pad to 16 byte boundary */
42e7ad6c 417 .2byte 0
0f3c2347
JK
418 .4byte .Ltext0 /* Address */
419 .4byte .Letext0-.Ltext0 /* Length */
08a67be6
JK
420 .4byte 0
421 .4byte 0
422 .section .debug_line
42e7ad6c 423.Ldebug_line0:
08a67be6 424 .section .debug_line.dwo
42e7ad6c 425.Lskeleton_debug_line0:
0f3c2347 426 .4byte .LELT0-.LSLT0 /* Length of Source Line Info */
42e7ad6c 427.LSLT0:
0f3c2347
JK
428 .2byte 0x4 /* DWARF Version */
429 .4byte .LELTP0-.LASLTP0 /* Prolog Length */
42e7ad6c 430.LASLTP0:
0f3c2347
JK
431 .byte 0x1 /* Minimum Instruction Length */
432 .byte 0x1 /* Maximum Operations Per Instruction */
433 .byte 0x1 /* Default is_stmt_start flag */
434 .byte 0xf6 /* Line Base Value (Special Opcodes) */
435 .byte 0xf5 /* Line Range Value (Special Opcodes) */
436 .byte 0xa /* Special Opcode Base */
437 .byte 0 /* opcode: 0x1 has 0 args */
438 .byte 0x1 /* opcode: 0x2 has 1 args */
439 .byte 0x1 /* opcode: 0x3 has 1 args */
440 .byte 0x1 /* opcode: 0x4 has 1 args */
441 .byte 0x1 /* opcode: 0x5 has 1 args */
442 .byte 0 /* opcode: 0x6 has 0 args */
443 .byte 0 /* opcode: 0x7 has 0 args */
444 .byte 0 /* opcode: 0x8 has 0 args */
445 .byte 0x1 /* opcode: 0x9 has 1 args */
446 .byte 0 /* End directory table */
447 .ascii "fission-reread.cc\0" /* File Entry: 0x1 */
42e7ad6c
DE
448 .uleb128 0
449 .uleb128 0
450 .uleb128 0
0f3c2347 451 .byte 0 /* End file name table */
42e7ad6c
DE
452.LELTP0:
453.LELT0:
08a67be6 454 .section .debug_addr
42e7ad6c 455.Ldebug_addr0:
0f3c2347
JK
456 .4byte .LFB0 /* DW_AT_low_pc */
457 .4byte baz /* DW_AT_location */
This page took 0.049734 seconds and 4 git commands to generate.