1 /* Copyright 2012 Free Software Foundation, Inc.
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.
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.
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/>. */
16 /* Testcase to exercise the code path in bug 13961 for Fission.
17 http://gcc.gnu.org/wiki/DebugFission
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.
41 .file "fission-reread.cc"
57 .file 1 "fission-reread.cc"
64 .section .debug_types.dwo,"G",@progbits,wt.198b7eaccef12290,comdat
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 0x8 # Pointer Size (in bytes)
70 .byte 0x19 # Type Signature
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
89 .4byte .Lskeleton_debug_line0 # DW_AT_stmt_list
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 */
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
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
120 .section .debug_types,"G",@progbits,wt.198b7eaccef12290,comdat
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 0x8 # Pointer Size (in bytes)
126 .byte 0x19 # Type Signature
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
145 .section .debug_info.dwo,"",@progbits
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 0x8 # 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
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)
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 .8byte .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
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
198 .section .debug_info,"",@progbits
199 .Lskeleton_debug_info0:
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 0x8 # Pointer Size (in bytes)
205 .uleb128 0x1 # (DIE (0) DW_TAG_compile_unit)
206 .8byte .Ltext0 # DW_AT_low_pc
207 .8byte .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
226 .section .debug_abbrev,"",@progbits
227 .Lskeleton_debug_abbrev0:
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)
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)
266 .byte 0 # end of skeleton .debug_abbrev
267 .section .debug_abbrev.dwo,"",@progbits
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)
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)
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)
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)
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)
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)
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)
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. */
388 .section .debug_pubnames,"",@progbits
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
399 .section .debug_pubtypes,"",@progbits
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
410 .section .debug_aranges,"",@progbits
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
418 .8byte .Ltext0 # Address
419 .8byte .Letext0-.Ltext0 # Length
422 .section .debug_line,"",@progbits
424 .section .debug_line.dwo,"",@progbits
425 .Lskeleton_debug_line0:
426 .4byte .LELT0-.LSLT0 # Length of Source Line Info
428 .2byte 0x4 # DWARF Version
429 .4byte .LELTP0-.LASLTP0 # Prolog Length
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
451 .byte 0 # End file name table
454 .section .debug_addr,"",@progbits
456 .8byte .LFB0 # DW_AT_low_pc
457 .8byte baz # DW_AT_location
459 .section .note.GNU-stack,"",@progbits