Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@gnat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA/hppa] Fix pb in inferior function call
Date: Wed, 31 Mar 2004 18:47:00 -0000	[thread overview]
Message-ID: <20040331184744.GS888@gnat.com> (raw)
In-Reply-To: <20040331043505.GA18128@nevyn.them.org>

[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]

> > 2004-04-30  J. Brobecker  <brobecker@gnat.com>
> > 
> >         * 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  <brobecker@gnat.com>
  
        * hppa-tdep.c (hppa32_push_dummy_call): Set the Stack Pointer.
        (hppa64_push_dummy_call): Likewise.

Thanks,
-- 
Joel

[-- Attachment #2: hppa-tdep-branch.diff --]
[-- Type: text/plain, Size: 1031 bytes --]

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.  */

  parent reply	other threads:[~2004-03-31 18:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-31  4:18 Joel Brobecker
2004-03-31  4:35 ` Daniel Jacobowitz
2004-03-31 16:24   ` Andrew Cagney
2004-03-31 18:47   ` Joel Brobecker [this message]
2004-03-31 19:28     ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040331184744.GS888@gnat.com \
    --to=brobecker@gnat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox