From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29749 invoked by alias); 1 Apr 2002 23:19:37 -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 29742 invoked from network); 1 Apr 2002 23:19:36 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 1 Apr 2002 23:19:36 -0000 Received: from redhat.com (rtl.cygnus.com [205.180.230.21]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id PAA09057; Mon, 1 Apr 2002 15:19:34 -0800 (PST) Message-ID: <3CA8EA77.E13EBB47@redhat.com> Date: Mon, 01 Apr 2002 15:19:00 -0000 From: Fernando Nasser Organization: Red Hat Canada X-Accept-Language: en MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb-patches@sources.redhat.com, Anthony Green Subject: Re: [RFA/testsuite] Tweak gdb.java/jmisc.java to pass on PowerPC References: <20020401165524.A11531@nevyn.them.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00008.txt.bz2 Anthony, Do you have any objections? Regards, Fernando Daniel Jacobowitz wrote: > > At the current time, GCJ emits a call to _Jv_InitClass in the prologue of > jmisc.main. That's right, a function call in the prologue. What this means > to us is that if an argument does not have a second home in the function, > and it is passed in a register, we'll never be able to print it inside the > function. It will be clobbered by the time we stop outside of the prologue. > The only reason the test passed on i386 was because the incoming argument > was actually located on the stack (and thus survived the function call). > > [this is especially nasty because failing to print a Java array makes GDB > very sad. It loops for hours, walking up the stack (very slowly because of > thread_db). We then kill gdb, which may or may not kill jmisc, so the > testsuite tends to leave zombies lying around.] > > This patch adds a use of the argument after the prologue, so that it will > still be available to print. OK to commit? > > -- > Daniel Jacobowitz Carnegie Mellon University > MontaVista Software Debian GNU/Linux Developer > > 2002-04-01 Daniel Jacobowitz > > * gdb.java/jmisc.java: Add ``void foo (int len)''. Call it. > * gdb.java/jmisc.exp (ptype jmisc): Update to match. > > Index: gdb.java/jmisc.exp > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/gdb.java/jmisc.exp,v > retrieving revision 1.2 > diff -u -p -r1.2 jmisc.exp > --- jmisc.exp 2001/03/06 08:21:58 1.2 > +++ jmisc.exp 2002/04/01 21:45:07 > @@ -70,7 +70,7 @@ if ![set_lang_java] then { > > send_gdb "ptype jmisc\n" > gdb_expect { > - -re "type = class jmisc extends java.lang.Object \{\[\r\n\ \t]+void main\\(java\.lang\.String\\\[]\\);\[\r\n\ \t]+void \\(void\\);\[\r\n\ \t]+\}\[\r\n\ \t]+$gdb_prompt $" { pass "ptype jmisc" } > + -re "type = class jmisc extends java.lang.Object \{\[\r\n\ \t\]+void foo\\(int\\);\[\r\n\ \t\]+void main\\(java\.lang\.String\\\[]\\);\[\r\n\ \t]+jmisc\\(\\);\[\r\n\ \t]+\}\[\r\n\ \t]+$gdb_prompt $" { pass "ptype jmisc" } > -re ".*$gdb_prompt $" { fail "ptype jmisc" } > timeout { fail "ptype jmisc (timeout)" ; return } > } > Index: gdb.java/jmisc.java > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/gdb.java/jmisc.java,v > retrieving revision 1.1 > diff -u -p -r1.1 jmisc.java > --- jmisc.java 2000/07/24 04:34:52 1.1 > +++ jmisc.java 2002/04/01 21:45:07 > @@ -1,7 +1,12 @@ > public class jmisc > { > + public static void foo (int len) > + { > + return; > + } > public static void main (String[] args) > { > + foo (args.length); > return; > } > } -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9