]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blob - gdb/patches/gdb-6.7-bz426600-DW_TAG_interface_type-test.patch
9dc8a7ba28734f2532a3bdf703467db02f46a544
[people/arne_f/ipfire-3.x.git] / gdb / patches / gdb-6.7-bz426600-DW_TAG_interface_type-test.patch
1 http://sourceware.org/ml/gdb-patches/2007-12/msg00397.html
2
3 2007-12-22 Jan Kratochvil <jan.kratochvil@redhat.com>
4
5 * gdb.arch/i386-interface.S, gdb.arch/i386-interface.exp: New files.
6
7 2008-03-02 Jan Kratochvil <jan.kratochvil@redhat.com>
8
9 * gdb.arch/i386-interface.exp: Fix a testcase race.
10
11 --- /dev/null 1 Jan 1970 00:00:00 -0000
12 +++ ./gdb/testsuite/gdb.arch/i386-interface.S 22 Dec 2007 19:07:28 -0000
13 @@ -0,0 +1,628 @@
14 +/* Copyright 2007 Free Software Foundation, Inc.
15 +
16 + This program is free software; you can redistribute it and/or modify
17 + it under the terms of the GNU General Public License as published by
18 + the Free Software Foundation; either version 3 of the License, or
19 + (at your option) any later version.
20 +
21 + This program is distributed in the hope that it will be useful,
22 + but WITHOUT ANY WARRANTY; without even the implied warranty of
23 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 + GNU General Public License for more details.
25 +
26 + You should have received a copy of the GNU General Public License
27 + along with this program. If not, see <http://www.gnu.org/licenses/>.
28 +
29 + Please email any bugs, comments, and/or additions to this file to:
30 + bug-gdb@gnu.org
31 +
32 + This file is part of the gdb testsuite.
33 +
34 + This file was produced by:
35 + $ gcj -S interface.java -ggdb2 -Wall -m32
36 + from the .java file:
37 + interface Interface
38 + {
39 + }
40 + class Class implements Interface
41 + {
42 + }
43 +*/
44 +
45 + .file "cc28Pp2B.jar"
46 + .section .debug_abbrev,"",@progbits
47 +.Ldebug_abbrev0:
48 + .section .debug_info,"",@progbits
49 +.Ldebug_info0:
50 + .section .debug_line,"",@progbits
51 +.Ldebug_line0:
52 + .text
53 +.Ltext0:
54 + .local _MT_Interface
55 + .comm _MT_Interface,0,4
56 + .data
57 + .align 4
58 + .type _catch_classes_Interface, @object
59 + .size _catch_classes_Interface, 24
60 +_catch_classes_Interface:
61 + .zero 24
62 + .section .rodata
63 + .align 2
64 + .type _Utf1, @object
65 + .size _Utf1, 4
66 +_Utf1:
67 + .value 36121
68 + .value 9
69 + .ascii "Interface"
70 + .zero 1
71 +.globl _ZN9Interface6class$E
72 + .data
73 + .align 32
74 + .type _ZN9Interface6class$E, @object
75 + .size _ZN9Interface6class$E, 144
76 +_ZN9Interface6class$E:
77 + .long _ZTVN4java4lang5ClassE+8
78 + .long 403000
79 + .long _Utf1
80 + .value 1536
81 + .zero 2
82 + .long 0
83 + .long 0
84 + .long 0
85 + .long 0
86 + .long _MT_Interface
87 + .value 0
88 + .value 6
89 + .long 0
90 + .long 4
91 + .value 0
92 + .value 0
93 + .long 0
94 + .long 0
95 + .long 0
96 + .long 0
97 + .long 0
98 + .long 0
99 + .long 0
100 + .long _catch_classes_Interface
101 + .long 0
102 + .long 0
103 + .value 0
104 + .byte 1
105 + .zero 1
106 + .long 0
107 + .value 0
108 + .zero 2
109 + .long 0
110 + .long 0
111 + .long 0
112 + .long 0
113 + .long 0
114 + .long 0
115 + .long 0
116 + .long 0
117 + .long 0
118 + .long 0
119 + .hidden _ZN9Interface7class$$E
120 +.globl _ZN9Interface7class$$E
121 + .section .rodata
122 + .align 4
123 + .type _ZN9Interface7class$$E, @object
124 + .size _ZN9Interface7class$$E, 4
125 +_ZN9Interface7class$$E:
126 + .long _ZN9Interface6class$E
127 + .text
128 + .align 2
129 +.globl _ZN5ClassC1Ev
130 + .type _ZN5ClassC1Ev, @function
131 +_ZN5ClassC1Ev:
132 +.LFB2:
133 + pushl %ebp
134 +.LCFI0:
135 + movl %esp, %ebp
136 +.LCFI1:
137 + subl $24, %esp
138 +.LCFI2:
139 +.LBB2:
140 +#if 0
141 + .file 1 "interface.java"
142 +#else
143 + .file "interface.java"
144 +#endif
145 + .loc 1 4 0
146 + movl 8(%ebp), %eax
147 + movl %eax, -4(%ebp)
148 + movl -4(%ebp), %eax
149 + movl %eax, (%esp)
150 + call _ZN4java4lang6ObjectC1Ev
151 +.LBE2:
152 + leave
153 + ret
154 +.LFE2:
155 + .size _ZN5ClassC1Ev, .-_ZN5ClassC1Ev
156 + .hidden _ZTVN5ClassE
157 +.globl _ZTVN5ClassE
158 + .data
159 + .align 32
160 + .type _ZTVN5ClassE, @object
161 + .size _ZTVN5ClassE, 40
162 +_ZTVN5ClassE:
163 + .long 0
164 + .long 0
165 + .long _ZN5Class6class$E
166 + .long 4
167 + .long _ZN4java4lang6Object8finalizeEJvv
168 + .long _ZN4java4lang6Object8hashCodeEJiv
169 + .long _ZN4java4lang6Object6equalsEJbPS1_
170 + .long _ZN4java4lang6Object8toStringEJPNS0_6StringEv
171 + .long _ZN4java4lang6Object5cloneEJPS1_v
172 + .long _ZN4java4lang6Object22throwNoSuchMethodErrorEJvv
173 + .set .L_ZN5ClassC1Ev0,_ZN5ClassC1Ev
174 + .section .rodata
175 + .align 2
176 + .type _Utf2, @object
177 + .size _Utf2, 4
178 +_Utf2:
179 + .value 626
180 + .value 6
181 + .ascii "<init>"
182 + .zero 1
183 + .align 2
184 + .type _Utf3, @object
185 + .size _Utf3, 4
186 +_Utf3:
187 + .value 39797
188 + .value 3
189 + .ascii "()V"
190 + .zero 1
191 + .data
192 + .align 4
193 + .type _MT_Class, @object
194 + .size _MT_Class, 20
195 +_MT_Class:
196 + .long _Utf2
197 + .long _Utf3
198 + .value 16384
199 + .value -1
200 + .long .L_ZN5ClassC1Ev0
201 + .long 0
202 + .align 4
203 + .type _IF_Class, @object
204 + .size _IF_Class, 4
205 +_IF_Class:
206 + .long _ZN9Interface6class$E
207 + .align 4
208 + .type _catch_classes_Class, @object
209 + .size _catch_classes_Class, 24
210 +_catch_classes_Class:
211 + .zero 24
212 + .section .rodata
213 + .align 2
214 + .type _Utf4, @object
215 + .size _Utf4, 4
216 +_Utf4:
217 + .value 47448
218 + .value 5
219 + .ascii "Class"
220 + .zero 1
221 +.globl _ZN5Class6class$E
222 + .data
223 + .align 32
224 + .type _ZN5Class6class$E, @object
225 + .size _ZN5Class6class$E, 144
226 +_ZN5Class6class$E:
227 + .long _ZTVN4java4lang5ClassE+8
228 + .long 403000
229 + .long _Utf4
230 + .value 32
231 + .zero 2
232 + .long _ZN4java4lang6Object6class$E
233 + .long 0
234 + .long 0
235 + .long 0
236 + .long _MT_Class
237 + .value 1
238 + .value 6
239 + .long 0
240 + .long 4
241 + .value 0
242 + .value 0
243 + .long _ZTVN5ClassE+8
244 + .long 0
245 + .long 0
246 + .long 0
247 + .long 0
248 + .long 0
249 + .long 0
250 + .long _catch_classes_Class
251 + .long _IF_Class
252 + .long 0
253 + .value 1
254 + .byte 1
255 + .zero 1
256 + .long 0
257 + .value 0
258 + .zero 2
259 + .long 0
260 + .long 0
261 + .long 0
262 + .long 0
263 + .long 0
264 + .long 0
265 + .long 0
266 + .long 0
267 + .long 0
268 + .long 0
269 + .hidden _ZN5Class7class$$E
270 +.globl _ZN5Class7class$$E
271 + .section .rodata
272 + .align 4
273 + .type _ZN5Class7class$$E, @object
274 + .size _ZN5Class7class$$E, 4
275 +_ZN5Class7class$$E:
276 + .long _ZN5Class6class$E
277 + .section .jcr,"aw",@progbits
278 + .align 4
279 + .long _ZN9Interface6class$E
280 + .long _ZN5Class6class$E
281 + .section .debug_frame,"",@progbits
282 +.Lframe0:
283 + .long .LECIE0-.LSCIE0
284 +.LSCIE0:
285 + .long 0xffffffff
286 + .byte 0x1
287 + .string ""
288 + .uleb128 0x1
289 + .sleb128 -4
290 + .byte 0x8
291 + .byte 0xc
292 + .uleb128 0x4
293 + .uleb128 0x4
294 + .byte 0x88
295 + .uleb128 0x1
296 + .align 4
297 +.LECIE0:
298 +.LSFDE0:
299 + .long .LEFDE0-.LASFDE0
300 +.LASFDE0:
301 + .long .Lframe0
302 + .long .LFB2
303 + .long .LFE2-.LFB2
304 + .byte 0x4
305 + .long .LCFI0-.LFB2
306 + .byte 0xe
307 + .uleb128 0x8
308 + .byte 0x85
309 + .uleb128 0x2
310 + .byte 0x4
311 + .long .LCFI1-.LCFI0
312 + .byte 0xd
313 + .uleb128 0x5
314 + .align 4
315 +.LEFDE0:
316 + .section .eh_frame,"a",@progbits
317 +.Lframe1:
318 + .long .LECIE1-.LSCIE1
319 +.LSCIE1:
320 + .long 0x0
321 + .byte 0x1
322 +.globl __gcj_personality_v0
323 + .string "zP"
324 + .uleb128 0x1
325 + .sleb128 -4
326 + .byte 0x8
327 + .uleb128 0x5
328 + .byte 0x0
329 + .long __gcj_personality_v0
330 + .byte 0xc
331 + .uleb128 0x4
332 + .uleb128 0x4
333 + .byte 0x88
334 + .uleb128 0x1
335 + .align 4
336 +.LECIE1:
337 +.LSFDE1:
338 + .long .LEFDE1-.LASFDE1
339 +.LASFDE1:
340 + .long .LASFDE1-.Lframe1
341 + .long .LFB2
342 + .long .LFE2-.LFB2
343 + .uleb128 0x0
344 + .byte 0x4
345 + .long .LCFI0-.LFB2
346 + .byte 0xe
347 + .uleb128 0x8
348 + .byte 0x85
349 + .uleb128 0x2
350 + .byte 0x4
351 + .long .LCFI1-.LCFI0
352 + .byte 0xd
353 + .uleb128 0x5
354 + .align 4
355 +.LEFDE1:
356 + .text
357 +.Letext0:
358 + .section .debug_loc,"",@progbits
359 +.Ldebug_loc0:
360 +.LLST0:
361 + .long .LFB2-.Ltext0
362 + .long .LCFI0-.Ltext0
363 + .value 0x2
364 + .byte 0x74
365 + .sleb128 4
366 + .long .LCFI0-.Ltext0
367 + .long .LCFI1-.Ltext0
368 + .value 0x2
369 + .byte 0x74
370 + .sleb128 8
371 + .long .LCFI1-.Ltext0
372 + .long .LFE2-.Ltext0
373 + .value 0x2
374 + .byte 0x75
375 + .sleb128 8
376 + .long 0x0
377 + .long 0x0
378 + .section .debug_info
379 + .long 0x117
380 + .value 0x2
381 + .long .Ldebug_abbrev0
382 + .byte 0x4
383 + .uleb128 0x1
384 + .string "GNU Java 4.3.0 20071221 (experimental)"
385 + .byte 0xb
386 + .string "interface.java"
387 + .string "/home/jkratoch/redhat/bz371831"
388 + .long .Ltext0
389 + .long .Letext0
390 + .long .Ldebug_line0
391 + .uleb128 0x2
392 + .string "Interface"
393 + .byte 0x4
394 + .byte 0x1
395 + .byte 0x0
396 + .long 0x8e
397 + .long 0x8e
398 + .uleb128 0x3
399 + .long 0x8e
400 + .byte 0x2
401 + .byte 0x23
402 + .uleb128 0x0
403 + .byte 0x1
404 + .byte 0x0
405 + .uleb128 0x4
406 + .string "java.lang.Object"
407 + .byte 0x1
408 + .uleb128 0x5
409 + .string "Class"
410 + .byte 0x4
411 + .byte 0x1
412 + .byte 0x0
413 + .long 0x8e
414 + .long 0xe8
415 + .uleb128 0x3
416 + .long 0x8e
417 + .byte 0x2
418 + .byte 0x23
419 + .uleb128 0x0
420 + .byte 0x1
421 + .uleb128 0x6
422 + .long 0x6e
423 + .byte 0x2
424 + .byte 0x23
425 + .uleb128 0x0
426 + .byte 0x1
427 + .byte 0x1
428 + .uleb128 0x7
429 + .byte 0x1
430 + .string "<init>"
431 + .byte 0x1
432 + .byte 0x0
433 + .string "_ZN5ClassC1Ev"
434 + .byte 0x1
435 + .uleb128 0x8
436 + .long 0xe8
437 + .byte 0x1
438 + .byte 0x0
439 + .byte 0x0
440 + .uleb128 0x9
441 + .byte 0x4
442 + .long 0xa1
443 + .uleb128 0xa
444 + .long 0xc6
445 + .long .LFB2
446 + .long .LFE2
447 + .long .LLST0
448 + .long 0x114
449 + .uleb128 0xb
450 + .long 0xe8
451 + .byte 0x2
452 + .byte 0x91
453 + .sleb128 0
454 + .uleb128 0xc
455 + .long 0x114
456 + .byte 0x2
457 + .byte 0x91
458 + .sleb128 -12
459 + .byte 0x0
460 + .uleb128 0x9
461 + .byte 0x4
462 + .long 0x8e
463 + .byte 0x0
464 + .section .debug_abbrev
465 + .uleb128 0x1
466 + .uleb128 0x11
467 + .byte 0x1
468 + .uleb128 0x25
469 + .uleb128 0x8
470 + .uleb128 0x13
471 + .uleb128 0xb
472 + .uleb128 0x3
473 + .uleb128 0x8
474 + .uleb128 0x1b
475 + .uleb128 0x8
476 + .uleb128 0x11
477 + .uleb128 0x1
478 + .uleb128 0x12
479 + .uleb128 0x1
480 + .uleb128 0x10
481 + .uleb128 0x6
482 + .byte 0x0
483 + .byte 0x0
484 + .uleb128 0x2
485 + .uleb128 0x38
486 + .byte 0x1
487 + .uleb128 0x3
488 + .uleb128 0x8
489 + .uleb128 0xb
490 + .uleb128 0xb
491 + .uleb128 0x3a
492 + .uleb128 0xb
493 + .uleb128 0x3b
494 + .uleb128 0xb
495 + .uleb128 0x1d
496 + .uleb128 0x13
497 + .uleb128 0x1
498 + .uleb128 0x13
499 + .byte 0x0
500 + .byte 0x0
501 + .uleb128 0x3
502 + .uleb128 0x1c
503 + .byte 0x0
504 + .uleb128 0x49
505 + .uleb128 0x13
506 + .uleb128 0x38
507 + .uleb128 0xa
508 + .uleb128 0x32
509 + .uleb128 0xb
510 + .byte 0x0
511 + .byte 0x0
512 + .uleb128 0x4
513 + .uleb128 0x2
514 + .byte 0x0
515 + .uleb128 0x3
516 + .uleb128 0x8
517 + .uleb128 0x3c
518 + .uleb128 0xc
519 + .byte 0x0
520 + .byte 0x0
521 + .uleb128 0x5
522 + .uleb128 0x2
523 + .byte 0x1
524 + .uleb128 0x3
525 + .uleb128 0x8
526 + .uleb128 0xb
527 + .uleb128 0xb
528 + .uleb128 0x3a
529 + .uleb128 0xb
530 + .uleb128 0x3b
531 + .uleb128 0xb
532 + .uleb128 0x1d
533 + .uleb128 0x13
534 + .uleb128 0x1
535 + .uleb128 0x13
536 + .byte 0x0
537 + .byte 0x0
538 + .uleb128 0x6
539 + .uleb128 0x1c
540 + .byte 0x0
541 + .uleb128 0x49
542 + .uleb128 0x13
543 + .uleb128 0x38
544 + .uleb128 0xa
545 + .uleb128 0x4c
546 + .uleb128 0xb
547 + .uleb128 0x32
548 + .uleb128 0xb
549 + .byte 0x0
550 + .byte 0x0
551 + .uleb128 0x7
552 + .uleb128 0x2e
553 + .byte 0x1
554 + .uleb128 0x3f
555 + .uleb128 0xc
556 + .uleb128 0x3
557 + .uleb128 0x8
558 + .uleb128 0x3a
559 + .uleb128 0xb
560 + .uleb128 0x3b
561 + .uleb128 0xb
562 + .uleb128 0x2007
563 + .uleb128 0x8
564 + .uleb128 0x3c
565 + .uleb128 0xc
566 + .byte 0x0
567 + .byte 0x0
568 + .uleb128 0x8
569 + .uleb128 0x5
570 + .byte 0x0
571 + .uleb128 0x49
572 + .uleb128 0x13
573 + .uleb128 0x34
574 + .uleb128 0xc
575 + .byte 0x0
576 + .byte 0x0
577 + .uleb128 0x9
578 + .uleb128 0xf
579 + .byte 0x0
580 + .uleb128 0xb
581 + .uleb128 0xb
582 + .uleb128 0x49
583 + .uleb128 0x13
584 + .byte 0x0
585 + .byte 0x0
586 + .uleb128 0xa
587 + .uleb128 0x2e
588 + .byte 0x1
589 + .uleb128 0x47
590 + .uleb128 0x13
591 + .uleb128 0x11
592 + .uleb128 0x1
593 + .uleb128 0x12
594 + .uleb128 0x1
595 + .uleb128 0x40
596 + .uleb128 0x6
597 + .uleb128 0x1
598 + .uleb128 0x13
599 + .byte 0x0
600 + .byte 0x0
601 + .uleb128 0xb
602 + .uleb128 0x5
603 + .byte 0x0
604 + .uleb128 0x49
605 + .uleb128 0x13
606 + .uleb128 0x2
607 + .uleb128 0xa
608 + .byte 0x0
609 + .byte 0x0
610 + .uleb128 0xc
611 + .uleb128 0x34
612 + .byte 0x0
613 + .uleb128 0x49
614 + .uleb128 0x13
615 + .uleb128 0x2
616 + .uleb128 0xa
617 + .byte 0x0
618 + .byte 0x0
619 + .byte 0x0
620 + .section .debug_pubnames,"",@progbits
621 + .long 0x15
622 + .value 0x2
623 + .long .Ldebug_info0
624 + .long 0x11b
625 + .long 0xee
626 + .string "()"
627 + .long 0x0
628 + .section .debug_aranges,"",@progbits
629 + .long 0x1c
630 + .value 0x2
631 + .long .Ldebug_info0
632 + .byte 0x4
633 + .byte 0x0
634 + .value 0x0
635 + .value 0x0
636 + .long .Ltext0
637 + .long .Letext0-.Ltext0
638 + .long 0x0
639 + .long 0x0
640 + .ident "GCC: (GNU) 4.3.0 20071221 (experimental)"
641 + .section .note.GNU-stack,"",@progbits
642 --- /dev/null 1 Jan 1970 00:00:00 -0000
643 +++ ./gdb/testsuite/gdb.arch/i386-interface.exp 22 Dec 2007 19:07:28 -0000
644 @@ -0,0 +1,59 @@
645 +# Copyright 2007 Free Software Foundation, Inc.
646 +
647 +# This program is free software; you can redistribute it and/or modify
648 +# it under the terms of the GNU General Public License as published by
649 +# the Free Software Foundation; either version 3 of the License, or
650 +# (at your option) any later version.
651 +#
652 +# This program is distributed in the hope that it will be useful,
653 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
654 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
655 +# GNU General Public License for more details.
656 +#
657 +# You should have received a copy of the GNU General Public License
658 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
659 +
660 +# Please email any bugs, comments, and/or additions to this file to:
661 +# bug-gdb@gnu.org
662 +
663 +# This file is part of the gdb testsuite.
664 +
665 +# Test basis recognization of DW_TAG_interface_type.
666 +# GCC java_classify_record() produces it if returns RECORD_IS_INTERFACE.
667 +
668 +if {![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]} then {
669 + verbose "Skipping i386 Java DW_TAG_interface_type test."
670 + return
671 +}
672 +
673 +set testfile "i386-interface"
674 +set srcfile ${testfile}.S
675 +set binfile ${objdir}/${subdir}/${testfile}.o
676 +
677 +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug additional_flags=-m32}] != "" } {
678 + untested i386-gnu-cfi.exp
679 + return -1
680 +}
681 +
682 +# Get things started.
683 +
684 +gdb_exit
685 +gdb_start
686 +gdb_reinitialize_dir $srcdir/$subdir
687 +gdb_load ${binfile}
688 +
689 +gdb_test "set language java"
690 +
691 +set test "ptype Interface"
692 +gdb_test_multiple $test $test {
693 + -re "type = class Interface *extends java.lang.Object \{.*$gdb_prompt $" {
694 + pass $test
695 + }
696 +}
697 +
698 +set test "ptype Class"
699 +gdb_test_multiple $test $test {
700 + -re "type = class Class *extends java.lang.Object implements Interface \{.*$gdb_prompt $" {
701 + pass $test
702 + }
703 +}