Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Eli Zaretskii <eliz@elta.co.il>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch rfc] PUSH_ARGUMENTS() -> push_dummy_call()
Date: Wed, 26 Mar 2003 22:41:00 -0000	[thread overview]
Message-ID: <3E822C9C.2030207@redhat.com> (raw)
In-Reply-To: <3405-Mon24Mar2003200357+0200-eliz@elta.co.il>

>> Date: Mon, 24 Mar 2003 00:28:26 -0500
>> From: Andrew Cagney <ac131313@redhat.com>
>> 
>> The attached patch addes the architecture method push_dummy_call() as a
>> successor for the deprecated PUSH_ARGUMENTS(). PUSH_ARGUMENTS() is used
>> when doing an inferior function call.   The new method takes two
>> additional parameters:
> 
> 
> The documentation patch is approved.  Thanks!

I've checked this in.

Andrew


> The attached patch addes the architecture method push_dummy_call() as a successor for the deprecated PUSH_ARGUMENTS(). PUSH_ARGUMENTS() is usedn when doing an inferior function call.   The new method takes two additional parameters:
> 
> regcache:
> An explict destination for all those register stores.
> 
> dummy_addr:
> The address of the call dummy (which contains the return breakpoint) allowing the function to set the return address.
> 
> In addition to pushing the arguments, this new method is expected set both the struct return and return addresses, and return the final aligned top-of-stack address.
> 
> By requiring this, much of the convoluted and largely sparc centric logic that sits between the old PUSH_ARGUMENTS() and SAVE_DUMMY_FRAME_TOS() calls can be eliminated.  This opening the possability of eliminating the methods:
>     PUSH_RETURN_ADDRESS()
>     CALL_DUMMY_STACK_ADJUST
>     STORE_STRUCT_RETURN
>     write_sp
> (expect more deprecating patches).
> 
> I'll look to commit this in a few days (it could take a bit to digest this one).
> 
> Andrew
> 
> PS: Looking at the comments, this one has been on the cards for ~7 years.
> 
> 
> 
> 2003-03-23  Andrew Cagney  <cagney@redhat.com>
> 
> 	* gdbarch.sh (DEPRECATED_PUSH_ARGUMENTS): Rename PUSH_ARGUMENTS.
> 	(push_dummy_call): New pure multi-arch replacement with gdbarch,
> 	regcache and dummy_addr parameters.
> 	* gdbarch.h, gdbarch.c: Re-generate.
> 	* valops.c (hand_function_call): Use gdbarch_push_dummy_call when
> 	available; assume it will handle stack alignment and return
> 	address issues.  Fall back to DEPRECATED_PUSH_ARGUMENTS and
> 	legacy_push_arguments.
> 	(legacy_push_arguments): Rename default_push_arguments.
> 	* value.h (legacy_push_arguments): Rename default_push_arguments.
> 	* i386-tdep.c (i386_push_arguments): Call legacy_push_arguments.
> 	* config/sparc/tm-sparc.h (DEPRECATED_PUSH_ARGUMENTS): Update.
> 	* config/sparc/tm-sp64.h (DEPRECATED_PUSH_ARGUMENTS): Update.
> 	* config/pa/tm-hppa.h (DEPRECATED_PUSH_ARGUMENTS): Update.
> 	* config/i386/tm-symmetry.h: Update.
> 	* xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
> 	* x86-64-tdep.c (x86_64_init_abi): Update.
> 	* v850-tdep.c (v850_gdbarch_init): Update.
> 	* sparc-tdep.c (sparc_gdbarch_init): Update.
> 	* sh-tdep.c (sh_gdbarch_init): Update.
> 	* s390-tdep.c (s390_gdbarch_init): Update.
> 	* rs6000-tdep.c (rs6000_gdbarch_init): Update.
> 	* mn10300-tdep.c (mn10300_gdbarch_init): Update.
> 	* mips-tdep.c (mips_gdbarch_init): Update.
> 	* mcore-tdep.c (mcore_gdbarch_init): Update.
> 	* m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
> 	* ia64-tdep.c (ia64_gdbarch_init): Update.
> 	* i386-tdep.c (i386_gdbarch_init): Update.
> 	* hppa-tdep.c (hppa_gdbarch_init): Update.
> 	* h8300-tdep.c (h8300_gdbarch_init): Update.
> 	* frv-tdep.c (frv_gdbarch_init): Update.
> 	* d10v-tdep.c (d10v_gdbarch_init): Update.
> 	* cris-tdep.c (cris_gdbarch_init): Update.
> 	* avr-tdep.c (avr_gdbarch_init): Update.
> 	* arm-tdep.c (arm_gdbarch_init): Update.
> 	* arm-linux-tdep.c (arm_linux_init_abi): Update.
> 	* alpha-tdep.c (alpha_gdbarch_init): Update.
> 
> Index: doc/ChangeLog
> 2003-03-23  Andrew Cagney  <cagney@redhat.com>
> 
> 	* gdbint.texinfo (Target Architecture Definition): Replace
> 	PUSH_ARGUMENTS with push_dummy_call, add gdbarch, regcache and
> 	dummy_addr parameters.




      reply	other threads:[~2003-03-26 22:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-24  5:28 Andrew Cagney
2003-03-24 14:19 ` Daniel Jacobowitz
2003-03-24 17:04   ` Andrew Cagney
2003-03-24 17:33     ` Daniel Jacobowitz
2003-03-25 20:05       ` Andrew Cagney
2003-03-24 18:18 ` Eli Zaretskii
2003-03-26 22:41   ` Andrew Cagney [this message]

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=3E822C9C.2030207@redhat.com \
    --to=ac131313@redhat.com \
    --cc=eliz@elta.co.il \
    --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