From: Kevin Buettner <kevinb@redhat.com>
To: Andrew Cagney <ac131313@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [rfa:ppc] Eliminate write_sp, but how?
Date: Wed, 10 Sep 2003 22:14:00 -0000 [thread overview]
Message-ID: <1030910221444.ZM19183@localhost.localdomain> (raw)
In-Reply-To: Andrew Cagney <ac131313@redhat.com> "[rfa:ppc] Eliminate write_sp, but how?" (Sep 10, 5:39pm)
On Sep 10, 5:39pm, Andrew Cagney wrote:
> The various ABIs have a requrement that the SP be decremented before
> writing anything to the stack (ignoring the red zone). This is to stop
> signal handlers and the like trashing the callers stack. The two PPC
> push_dummy_call (nee push_arguments) methods are already carefully
> complying to this requirement (setting SP before using the stack) and
> hence [deprecated] write_sp method which also sets the SP before a call
> is entirely redundant.
>
> Thing is, I don't see any reason to exactly matching the ABI behavior
> (that thread is stopped so it won't get anything writing to its stack)
> and further, I think exactly matching the behavior makes the code harder
> to understand (I'm having trouble convincing my self that it does what I
> think it does :-).
I agree with you.
> So, in addition to eliminating deprecated write_sp, would it be ok to
> move the write SP code to the end of the push_dummy_call methods?
I can't think of any problems that would arise from moving the "write
SP" code to the end of the various push_dummy_call() methods. But
just in case, when you change it, please note how it used to be done
and why doing it in a different location *shouldn't* be a problem.
(It may someday make it easier to debug that obscure target which
randomly picks a stopped thread's stack to service an interrupt...)
> 2003-09-10 Andrew Cagney <cagney@redhat.com>
>
> * rs6000-tdep.c (rs6000_gdbarch_init): Do not set
> "deprecated_dummy_write_sp".
Okay.
Kevin
next prev parent reply other threads:[~2003-09-10 22:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-10 21:39 Andrew Cagney
2003-09-10 22:14 ` Kevin Buettner [this message]
2003-09-11 19:26 ` 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=1030910221444.ZM19183@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=ac131313@redhat.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