From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16295 invoked by alias); 22 Dec 2007 19:27:47 -0000 Received: (qmail 16244 invoked by uid 22791); 22 Dec 2007 19:27:45 -0000 X-Spam-Check-By: sourceware.org Received: from pauline.vellum.cz (HELO pauline.vellum.cz) (89.250.243.234) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 22 Dec 2007 19:27:33 +0000 Received: from host0.dyn.jankratochvil.net (localhost.localdomain [127.0.0.1]) by pauline.vellum.cz (8.12.11.20060308/8.12.11) with ESMTP id lBMJRTDu015311 for ; Sat, 22 Dec 2007 20:27:29 +0100 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.2/8.14.1) with ESMTP id lBMJRQoM018359; Sat, 22 Dec 2007 20:27:26 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.2/8.14.2/Submit) id lBMJRQwl018358; Sat, 22 Dec 2007 20:27:26 +0100 Date: Sat, 22 Dec 2007 20:07:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Cc: Jakub Jelinek Subject: [patch] Basic DW_TAG_interface_type support Message-ID: <20071222192726.GA18166@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00398.txt.bz2 --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1689 Hi, attaching a straightforward support for DW_TAG_interface_type. Only the fixup_partial_die() presence of DW_TAG_class_type was not copied for DW_TAG_interface_type as DW_TAG_interface_type should never be anonymous. http://gcc.gnu.org/ml/gcc/2007-12/msg00583.html I hope to later extend it to utilize the new information (and print the class<->struct<->interface types identified appropriately). x86_64 GDB testsuite regressions free. Regards, Jan ------------------------------------------------------------------------------ GCC recently wanted to implement Java DW_TAG_interface_type (it was using DW_TAG_structure_type for everything): http://gcc.gnu.org/ml/gcc-patches/2007-11/msg01659.html but DW_TAG_interface_type is so far completely unsupported by GDB: http://gcc.gnu.org/ml/gcc/2007-12/msg00576.html Therefore DW_TAG_interface_type has became disabled now upstream: http://gcc.gnu.org/ml/gcc/2007-12/msg00626.html But it would be nice to enable it one day. GDB currently autodetects the interface type in java_type_print_derivation_info() according to ff it has virtual inheritance (I expect it is not ambiguous for Java). Patch to enable DW_TAG_interface_type production for the current GCC snapshot: --- gcc/java/lang.c (revision 131124) +++ gcc/java/lang.c (working copy) @@ -965,9 +965,7 @@ java_classify_record (tree type) if (! CLASS_P (type)) return RECORD_IS_STRUCT; - /* ??? GDB does not support DW_TAG_interface_type as of December, - 2007. Re-enable this at a later time. */ - if (0 && CLASS_INTERFACE (TYPE_NAME (type))) + if (CLASS_INTERFACE (TYPE_NAME (type))) return RECORD_IS_INTERFACE; return RECORD_IS_CLASS; --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="gdb-cvs-DW_TAG_interface_type-basic.patch" Content-length: 16178 gdb/ 2007-12-22 Jan Kratochvil * dwarf2read.c (scan_partial_symbols partial_die_parent_scope) (add_partial_symbol, pdi_needs_namespace, process_die) (is_type_tag_for_partial, load_partial_dies, new_symbol) (read_type_die, determine_prefix): Extend the current code of `DW_TAG_class_type' also for `DW_TAG_interface_type'. gdb/testsuite/ 2007-12-22 Jan Kratochvil * gdb.arch/i386-interface.S, gdb.arch/i386-interface.exp: New files. --- ./gdb/dwarf2read.c 17 Dec 2007 18:38:30 -0000 1.242 +++ ./gdb/dwarf2read.c 22 Dec 2007 19:07:23 -0000 @@ -1747,6 +1747,7 @@ scan_partial_symbols (struct partial_die } break; case DW_TAG_class_type: + case DW_TAG_interface_type: case DW_TAG_structure_type: if (!pdi->is_declaration) { @@ -1829,6 +1830,7 @@ partial_die_parent_scope (struct partial if (parent->tag == DW_TAG_namespace || parent->tag == DW_TAG_structure_type || parent->tag == DW_TAG_class_type + || parent->tag == DW_TAG_interface_type || parent->tag == DW_TAG_union_type) { if (grandparent_scope == NULL) @@ -1976,6 +1978,7 @@ add_partial_symbol (struct partial_die_i 0, (CORE_ADDR) 0, cu->language, objfile); break; case DW_TAG_class_type: + case DW_TAG_interface_type: case DW_TAG_structure_type: case DW_TAG_union_type: case DW_TAG_enumeration_type: @@ -2057,6 +2060,7 @@ pdi_needs_namespace (enum dwarf_tag tag) case DW_TAG_namespace: case DW_TAG_typedef: case DW_TAG_class_type: + case DW_TAG_interface_type: case DW_TAG_structure_type: case DW_TAG_union_type: case DW_TAG_enumeration_type: @@ -2676,6 +2680,7 @@ process_die (struct die_info *die, struc read_lexical_block_scope (die, cu); break; case DW_TAG_class_type: + case DW_TAG_interface_type: case DW_TAG_structure_type: case DW_TAG_union_type: read_structure_type (die, cu); @@ -5403,6 +5408,7 @@ is_type_tag_for_partial (int tag) #endif case DW_TAG_base_type: case DW_TAG_class_type: + case DW_TAG_interface_type: case DW_TAG_enumeration_type: case DW_TAG_structure_type: case DW_TAG_subrange_type: @@ -5608,6 +5614,7 @@ load_partial_dies (bfd *abfd, gdb_byte * || last_die->tag == DW_TAG_enumeration_type || (cu->language != language_c && (last_die->tag == DW_TAG_class_type + || last_die->tag == DW_TAG_interface_type || last_die->tag == DW_TAG_structure_type || last_die->tag == DW_TAG_union_type)))) { @@ -7358,6 +7365,7 @@ new_symbol (struct die_info *die, struct (FIXME?) */ break; case DW_TAG_class_type: + case DW_TAG_interface_type: case DW_TAG_structure_type: case DW_TAG_union_type: case DW_TAG_set_type: @@ -7677,6 +7685,7 @@ read_type_die (struct die_info *die, str switch (die->tag) { case DW_TAG_class_type: + case DW_TAG_interface_type: case DW_TAG_structure_type: case DW_TAG_union_type: read_structure_type (die, cu); @@ -7781,6 +7790,7 @@ determine_prefix (struct die_info *die, } break; case DW_TAG_class_type: + case DW_TAG_interface_type: case DW_TAG_structure_type: { if (parent->type != NULL && TYPE_TAG_NAME (parent->type) != NULL) --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ ./gdb/testsuite/gdb.arch/i386-interface.S 22 Dec 2007 19:07:28 -0000 @@ -0,0 +1,628 @@ +/* Copyright 2007 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + + Please email any bugs, comments, and/or additions to this file to: + bug-gdb@gnu.org + + This file is part of the gdb testsuite. + + This file was produced by: + $ gcj -S interface.java -ggdb2 -Wall -m32 + from the .java file: + interface Interface + { + } + class Class implements Interface + { + } +*/ + + .file "cc28Pp2B.jar" + .section .debug_abbrev,"",@progbits +.Ldebug_abbrev0: + .section .debug_info,"",@progbits +.Ldebug_info0: + .section .debug_line,"",@progbits +.Ldebug_line0: + .text +.Ltext0: + .local _MT_Interface + .comm _MT_Interface,0,4 + .data + .align 4 + .type _catch_classes_Interface, @object + .size _catch_classes_Interface, 24 +_catch_classes_Interface: + .zero 24 + .section .rodata + .align 2 + .type _Utf1, @object + .size _Utf1, 4 +_Utf1: + .value 36121 + .value 9 + .ascii "Interface" + .zero 1 +.globl _ZN9Interface6class$E + .data + .align 32 + .type _ZN9Interface6class$E, @object + .size _ZN9Interface6class$E, 144 +_ZN9Interface6class$E: + .long _ZTVN4java4lang5ClassE+8 + .long 403000 + .long _Utf1 + .value 1536 + .zero 2 + .long 0 + .long 0 + .long 0 + .long 0 + .long _MT_Interface + .value 0 + .value 6 + .long 0 + .long 4 + .value 0 + .value 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long _catch_classes_Interface + .long 0 + .long 0 + .value 0 + .byte 1 + .zero 1 + .long 0 + .value 0 + .zero 2 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .hidden _ZN9Interface7class$$E +.globl _ZN9Interface7class$$E + .section .rodata + .align 4 + .type _ZN9Interface7class$$E, @object + .size _ZN9Interface7class$$E, 4 +_ZN9Interface7class$$E: + .long _ZN9Interface6class$E + .text + .align 2 +.globl _ZN5ClassC1Ev + .type _ZN5ClassC1Ev, @function +_ZN5ClassC1Ev: +.LFB2: + pushl %ebp +.LCFI0: + movl %esp, %ebp +.LCFI1: + subl $24, %esp +.LCFI2: +.LBB2: +#if 0 + .file 1 "interface.java" +#else + .file "interface.java" +#endif + .loc 1 4 0 + movl 8(%ebp), %eax + movl %eax, -4(%ebp) + movl -4(%ebp), %eax + movl %eax, (%esp) + call _ZN4java4lang6ObjectC1Ev +.LBE2: + leave + ret +.LFE2: + .size _ZN5ClassC1Ev, .-_ZN5ClassC1Ev + .hidden _ZTVN5ClassE +.globl _ZTVN5ClassE + .data + .align 32 + .type _ZTVN5ClassE, @object + .size _ZTVN5ClassE, 40 +_ZTVN5ClassE: + .long 0 + .long 0 + .long _ZN5Class6class$E + .long 4 + .long _ZN4java4lang6Object8finalizeEJvv + .long _ZN4java4lang6Object8hashCodeEJiv + .long _ZN4java4lang6Object6equalsEJbPS1_ + .long _ZN4java4lang6Object8toStringEJPNS0_6StringEv + .long _ZN4java4lang6Object5cloneEJPS1_v + .long _ZN4java4lang6Object22throwNoSuchMethodErrorEJvv + .set .L_ZN5ClassC1Ev0,_ZN5ClassC1Ev + .section .rodata + .align 2 + .type _Utf2, @object + .size _Utf2, 4 +_Utf2: + .value 626 + .value 6 + .ascii "" + .zero 1 + .align 2 + .type _Utf3, @object + .size _Utf3, 4 +_Utf3: + .value 39797 + .value 3 + .ascii "()V" + .zero 1 + .data + .align 4 + .type _MT_Class, @object + .size _MT_Class, 20 +_MT_Class: + .long _Utf2 + .long _Utf3 + .value 16384 + .value -1 + .long .L_ZN5ClassC1Ev0 + .long 0 + .align 4 + .type _IF_Class, @object + .size _IF_Class, 4 +_IF_Class: + .long _ZN9Interface6class$E + .align 4 + .type _catch_classes_Class, @object + .size _catch_classes_Class, 24 +_catch_classes_Class: + .zero 24 + .section .rodata + .align 2 + .type _Utf4, @object + .size _Utf4, 4 +_Utf4: + .value 47448 + .value 5 + .ascii "Class" + .zero 1 +.globl _ZN5Class6class$E + .data + .align 32 + .type _ZN5Class6class$E, @object + .size _ZN5Class6class$E, 144 +_ZN5Class6class$E: + .long _ZTVN4java4lang5ClassE+8 + .long 403000 + .long _Utf4 + .value 32 + .zero 2 + .long _ZN4java4lang6Object6class$E + .long 0 + .long 0 + .long 0 + .long _MT_Class + .value 1 + .value 6 + .long 0 + .long 4 + .value 0 + .value 0 + .long _ZTVN5ClassE+8 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long _catch_classes_Class + .long _IF_Class + .long 0 + .value 1 + .byte 1 + .zero 1 + .long 0 + .value 0 + .zero 2 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .long 0 + .hidden _ZN5Class7class$$E +.globl _ZN5Class7class$$E + .section .rodata + .align 4 + .type _ZN5Class7class$$E, @object + .size _ZN5Class7class$$E, 4 +_ZN5Class7class$$E: + .long _ZN5Class6class$E + .section .jcr,"aw",@progbits + .align 4 + .long _ZN9Interface6class$E + .long _ZN5Class6class$E + .section .debug_frame,"",@progbits +.Lframe0: + .long .LECIE0-.LSCIE0 +.LSCIE0: + .long 0xffffffff + .byte 0x1 + .string "" + .uleb128 0x1 + .sleb128 -4 + .byte 0x8 + .byte 0xc + .uleb128 0x4 + .uleb128 0x4 + .byte 0x88 + .uleb128 0x1 + .align 4 +.LECIE0: +.LSFDE0: + .long .LEFDE0-.LASFDE0 +.LASFDE0: + .long .Lframe0 + .long .LFB2 + .long .LFE2-.LFB2 + .byte 0x4 + .long .LCFI0-.LFB2 + .byte 0xe + .uleb128 0x8 + .byte 0x85 + .uleb128 0x2 + .byte 0x4 + .long .LCFI1-.LCFI0 + .byte 0xd + .uleb128 0x5 + .align 4 +.LEFDE0: + .section .eh_frame,"a",@progbits +.Lframe1: + .long .LECIE1-.LSCIE1 +.LSCIE1: + .long 0x0 + .byte 0x1 +.globl __gcj_personality_v0 + .string "zP" + .uleb128 0x1 + .sleb128 -4 + .byte 0x8 + .uleb128 0x5 + .byte 0x0 + .long __gcj_personality_v0 + .byte 0xc + .uleb128 0x4 + .uleb128 0x4 + .byte 0x88 + .uleb128 0x1 + .align 4 +.LECIE1: +.LSFDE1: + .long .LEFDE1-.LASFDE1 +.LASFDE1: + .long .LASFDE1-.Lframe1 + .long .LFB2 + .long .LFE2-.LFB2 + .uleb128 0x0 + .byte 0x4 + .long .LCFI0-.LFB2 + .byte 0xe + .uleb128 0x8 + .byte 0x85 + .uleb128 0x2 + .byte 0x4 + .long .LCFI1-.LCFI0 + .byte 0xd + .uleb128 0x5 + .align 4 +.LEFDE1: + .text +.Letext0: + .section .debug_loc,"",@progbits +.Ldebug_loc0: +.LLST0: + .long .LFB2-.Ltext0 + .long .LCFI0-.Ltext0 + .value 0x2 + .byte 0x74 + .sleb128 4 + .long .LCFI0-.Ltext0 + .long .LCFI1-.Ltext0 + .value 0x2 + .byte 0x74 + .sleb128 8 + .long .LCFI1-.Ltext0 + .long .LFE2-.Ltext0 + .value 0x2 + .byte 0x75 + .sleb128 8 + .long 0x0 + .long 0x0 + .section .debug_info + .long 0x117 + .value 0x2 + .long .Ldebug_abbrev0 + .byte 0x4 + .uleb128 0x1 + .string "GNU Java 4.3.0 20071221 (experimental)" + .byte 0xb + .string "interface.java" + .string "/home/jkratoch/redhat/bz371831" + .long .Ltext0 + .long .Letext0 + .long .Ldebug_line0 + .uleb128 0x2 + .string "Interface" + .byte 0x4 + .byte 0x1 + .byte 0x0 + .long 0x8e + .long 0x8e + .uleb128 0x3 + .long 0x8e + .byte 0x2 + .byte 0x23 + .uleb128 0x0 + .byte 0x1 + .byte 0x0 + .uleb128 0x4 + .string "java.lang.Object" + .byte 0x1 + .uleb128 0x5 + .string "Class" + .byte 0x4 + .byte 0x1 + .byte 0x0 + .long 0x8e + .long 0xe8 + .uleb128 0x3 + .long 0x8e + .byte 0x2 + .byte 0x23 + .uleb128 0x0 + .byte 0x1 + .uleb128 0x6 + .long 0x6e + .byte 0x2 + .byte 0x23 + .uleb128 0x0 + .byte 0x1 + .byte 0x1 + .uleb128 0x7 + .byte 0x1 + .string "" + .byte 0x1 + .byte 0x0 + .string "_ZN5ClassC1Ev" + .byte 0x1 + .uleb128 0x8 + .long 0xe8 + .byte 0x1 + .byte 0x0 + .byte 0x0 + .uleb128 0x9 + .byte 0x4 + .long 0xa1 + .uleb128 0xa + .long 0xc6 + .long .LFB2 + .long .LFE2 + .long .LLST0 + .long 0x114 + .uleb128 0xb + .long 0xe8 + .byte 0x2 + .byte 0x91 + .sleb128 0 + .uleb128 0xc + .long 0x114 + .byte 0x2 + .byte 0x91 + .sleb128 -12 + .byte 0x0 + .uleb128 0x9 + .byte 0x4 + .long 0x8e + .byte 0x0 + .section .debug_abbrev + .uleb128 0x1 + .uleb128 0x11 + .byte 0x1 + .uleb128 0x25 + .uleb128 0x8 + .uleb128 0x13 + .uleb128 0xb + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x1b + .uleb128 0x8 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x1 + .uleb128 0x10 + .uleb128 0x6 + .byte 0x0 + .byte 0x0 + .uleb128 0x2 + .uleb128 0x38 + .byte 0x1 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x1d + .uleb128 0x13 + .uleb128 0x1 + .uleb128 0x13 + .byte 0x0 + .byte 0x0 + .uleb128 0x3 + .uleb128 0x1c + .byte 0x0 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xa + .uleb128 0x32 + .uleb128 0xb + .byte 0x0 + .byte 0x0 + .uleb128 0x4 + .uleb128 0x2 + .byte 0x0 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3c + .uleb128 0xc + .byte 0x0 + .byte 0x0 + .uleb128 0x5 + .uleb128 0x2 + .byte 0x1 + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x1d + .uleb128 0x13 + .uleb128 0x1 + .uleb128 0x13 + .byte 0x0 + .byte 0x0 + .uleb128 0x6 + .uleb128 0x1c + .byte 0x0 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x38 + .uleb128 0xa + .uleb128 0x4c + .uleb128 0xb + .uleb128 0x32 + .uleb128 0xb + .byte 0x0 + .byte 0x0 + .uleb128 0x7 + .uleb128 0x2e + .byte 0x1 + .uleb128 0x3f + .uleb128 0xc + .uleb128 0x3 + .uleb128 0x8 + .uleb128 0x3a + .uleb128 0xb + .uleb128 0x3b + .uleb128 0xb + .uleb128 0x2007 + .uleb128 0x8 + .uleb128 0x3c + .uleb128 0xc + .byte 0x0 + .byte 0x0 + .uleb128 0x8 + .uleb128 0x5 + .byte 0x0 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x34 + .uleb128 0xc + .byte 0x0 + .byte 0x0 + .uleb128 0x9 + .uleb128 0xf + .byte 0x0 + .uleb128 0xb + .uleb128 0xb + .uleb128 0x49 + .uleb128 0x13 + .byte 0x0 + .byte 0x0 + .uleb128 0xa + .uleb128 0x2e + .byte 0x1 + .uleb128 0x47 + .uleb128 0x13 + .uleb128 0x11 + .uleb128 0x1 + .uleb128 0x12 + .uleb128 0x1 + .uleb128 0x40 + .uleb128 0x6 + .uleb128 0x1 + .uleb128 0x13 + .byte 0x0 + .byte 0x0 + .uleb128 0xb + .uleb128 0x5 + .byte 0x0 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0xa + .byte 0x0 + .byte 0x0 + .uleb128 0xc + .uleb128 0x34 + .byte 0x0 + .uleb128 0x49 + .uleb128 0x13 + .uleb128 0x2 + .uleb128 0xa + .byte 0x0 + .byte 0x0 + .byte 0x0 + .section .debug_pubnames,"",@progbits + .long 0x15 + .value 0x2 + .long .Ldebug_info0 + .long 0x11b + .long 0xee + .string "()" + .long 0x0 + .section .debug_aranges,"",@progbits + .long 0x1c + .value 0x2 + .long .Ldebug_info0 + .byte 0x4 + .byte 0x0 + .value 0x0 + .value 0x0 + .long .Ltext0 + .long .Letext0-.Ltext0 + .long 0x0 + .long 0x0 + .ident "GCC: (GNU) 4.3.0 20071221 (experimental)" + .section .note.GNU-stack,"",@progbits --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ ./gdb/testsuite/gdb.arch/i386-interface.exp 22 Dec 2007 19:07:28 -0000 @@ -0,0 +1,66 @@ +# Copyright 2007 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please email any bugs, comments, and/or additions to this file to: +# bug-gdb@gnu.org + +# This file is part of the gdb testsuite. + +# Test basis recognization of DW_TAG_interface_type. +# GCC java_classify_record() produces it if returns RECORD_IS_INTERFACE. + +if $tracelevel { + strace $tracelevel +} + +set prms_id 0 +set bug_id 0 + +if {![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]} then { + verbose "Skipping i386 Java DW_TAG_interface_type test." + return +} + +set testfile "i386-interface" +set srcfile ${testfile}.S +set binfile ${objdir}/${subdir}/${testfile}.o + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug additional_flags=-m32}] != "" } { + untested i386-gnu-cfi.exp + return -1 +} + +# Get things started. + +gdb_exit +gdb_start +gdb_reinitialize_dir $srcdir/$subdir +gdb_load ${binfile} + +gdb_test "set language java" + +set test "ptype Interface" +gdb_test_multiple $test $test { + -re "type = class Interface *extends java.lang.Object \{" { + pass $test + } +} + +set test "ptype Class" +gdb_test_multiple $test $test { + -re "type = class Class *extends java.lang.Object implements Interface \{" { + pass $test + } +} --ZGiS0Q5IWpPtfppv--