From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29892 invoked by alias); 17 Jun 2004 03:06:05 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29875 invoked from network); 17 Jun 2004 03:06:04 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 17 Jun 2004 03:06:04 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1BanE3-00005t-QM for ; Wed, 16 Jun 2004 23:06:03 -0400 Date: Thu, 17 Jun 2004 03:06:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [RFA]: Java Inferior Call Take 2 Message-ID: <20040617030603.GC23443@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <40A9264C.4060404@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40A9264C.4060404@redhat.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-06/txt/msg00397.txt.bz2 On Mon, May 17, 2004 at 04:53:32PM -0400, Jeff Johnston wrote: > This is the reworked java inferior call patch. My previous attempt tried > to modify the gdb v3 abi code to handle missing debug information from gcj. > After a couple of gcc patches from Andrew Haley, the gnu-v3-abi.c code > doesn't require any tampering. > > I had to enhance dwarf2read.c to handle the java vtable name (which is > vtable) and to modify C++-only code to handle java syntax for class names. > > I have included a test case. > > Ok to commit? First of all, it doesn't work for me; I'm guessing that's because I have gcj 3.3 installed. Are the GCC changes in any released version of GCC yet, so that I can add appropriately versioned XFAILs? > * valarith.c (value_subscript): Treat an array with upper-bound > of -1 as unknown size. I still don't understand why this change is necessary, i.e. why providing a large upper bound causes the whole memory region to be loaded from the inferior. That should not happen. > @@ -3101,7 +3112,29 @@ dwarf2_add_member_fn (struct field_info > /* Get name of member function. */ > attr = dwarf2_attr (die, DW_AT_name, cu); > if (attr && DW_STRING (attr)) > - fieldname = DW_STRING (attr); > + { > + /* Note: C++ and Java currently differ in how the member function > + name is stored in the debug info. For Java, the member name is > + fully qualified with prototype while C++ just has the member > + name. To get the Java member name, we strip off any dot qualifiers > + and remove the trailing prototype. */ Other changes have been made to gcj's debug output in order for this to work; wouldn't this be a good time to fix the above? No one's given a reason that I recall for GCJ to abuse DW_AT_name in this fashion. -- Daniel Jacobowitz