From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5872 invoked by alias); 31 Mar 2004 18:47:47 -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 5840 invoked from network); 31 Mar 2004 18:47:45 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sources.redhat.com with SMTP; 31 Mar 2004 18:47:45 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 686EC47D62; Wed, 31 Mar 2004 10:47:44 -0800 (PST) Date: Wed, 31 Mar 2004 18:47:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: Re: [RFA/hppa] Fix pb in inferior function call Message-ID: <20040331184744.GS888@gnat.com> References: <20040331041848.GO888@gnat.com> <20040331043505.GA18128@nevyn.them.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="svZFHVx8/dhPCe52" Content-Disposition: inline In-Reply-To: <20040331043505.GA18128@nevyn.them.org> User-Agent: Mutt/1.4i X-SW-Source: 2004-03/txt/msg00765.txt.bz2 --svZFHVx8/dhPCe52 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1071 > > 2004-04-30 J. Brobecker > > > > * hppa-tdep.c (hppa32_push_dummy_call): Set the Stack Pointer. > > (hppa64_push_dummy_call): Likewise. > > > > The change has been tested on hppa32-hpux11.00, and it fixes roughly > > 500 regressions (yay! :-). It also brings the duration of the testsuite > > run from several hours down to about 45 mins. > > > > I didn't test the change for hppa64, but it seems pretty obvious if > > the hppa32 one is correct. > > > > OK to apply? > > OK. You're right; push_dummy_call should update the stack pointer > itself. Thanks. Checked in. Andrew asked: > Joel, do you think a pull up of the hppa stuff onto the 6.1 branch would > be useful? (it can only break HP/UX so is "mostly harmless"). Yes, I think so. I tested and then committed the attached patch for the branch (there was one minor edit to make). 2004-04-31 J. Brobecker * hppa-tdep.c (hppa32_push_dummy_call): Set the Stack Pointer. (hppa64_push_dummy_call): Likewise. Thanks, -- Joel --svZFHVx8/dhPCe52 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="hppa-tdep-branch.diff" Content-length: 1031 Index: hppa-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/hppa-tdep.c,v retrieving revision 1.129.2.1 diff -u -p -r1.129.2.1 hppa-tdep.c --- hppa-tdep.c 10 Mar 2004 20:06:08 -0000 1.129.2.1 +++ hppa-tdep.c 31 Mar 2004 18:41:17 -0000 @@ -2269,6 +2269,9 @@ hppa32_push_dummy_call (struct gdbarch * /* Set the return address. */ regcache_cooked_write_unsigned (regcache, RP_REGNUM, bp_addr); + /* Update the Stack Pointer. */ + regcache_cooked_write_unsigned (regcache, SP_REGNUM, param_end + 32); + /* The stack will have 32 bytes of additional space for a frame marker. */ return param_end + 32; } @@ -2392,6 +2395,9 @@ hppa64_push_dummy_call (struct gdbarch * /* Set the return address. */ regcache_cooked_write_unsigned (regcache, RP_REGNUM, bp_addr); + + /* Update the Stack Pointer. */ + regcache_cooked_write_unsigned (regcache, SP_REGNUM, sp + 64); /* The stack will have 64 bytes of additional space for a frame marker. */ --svZFHVx8/dhPCe52--