Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfa/6.0] Better handle unspecified CFI values
Date: Tue, 09 Sep 2003 17:35:00 -0000	[thread overview]
Message-ID: <20030909173543.GA5722@nevyn.them.org> (raw)
In-Reply-To: <vt2wuchvptc.fsf@zenia.home>

On Tue, Sep 09, 2003 at 12:23:27PM -0500, Jim Blandy wrote:
> 
> Daniel Jacobowitz <drow@mvista.com> writes:
> > Yes - normally.  On S/390, stdcall, et cetera (anywhere where the hack
> > would be wrong) it gets even worse.  We can only compute expressions
> > describing a memory location where the register is saved, not computed
> > values.  For stack pointers (and maybe frame pointers on some
> > architectures?) this isn't good enough.
> 
> Not to pursue unimportant tangents, but why would the hack be wrong on
> the S/390?  Its frames are normally FP-free, but aside from that,
> what's unusual about it?

I'm wrong about the S/390 being the problem - in fact it was the
_opposite_ of the problem.  From:

  http://gcc.gnu.org/ml/gcc-patches/2003-05/msg00904.html

    From the previous discussions, it would appear to me that
    the real difference between s390 and other platforms here
    is that on s390, the stack pointer register is saved and
    restored from the call stack frame, like any other call-
    saved register.  This means that uw_install_context can
    install the target stack pointer simply by writing it
    into the current stack frame, just like any other call-
    saved register.

    If this is possible, there is no need for the unwinder
    routines to perform any special handling w.r.t. the
    stack pointer register at all.  This means that there
    should be no need to define EH_RETURN_STACKADJ_RTX,
    and everything related to this should be omitted by
    the library.  This also means that the special-cased
    code for 'simulating' the stack pointer register in
    uw_update_context (which is what caused the breakage
    on s390) is just superfluous.

GCC has a local hack in it, essentially, which handles adjusting the
stack pointer for a frame back far enough.  At least it seems that way
to me.  This hack is equivalent to the problem that GDB has for
figuring out the saved SP.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-09-09 17:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-06  0:57 Andrew Cagney
2003-09-06 21:34 ` Daniel Jacobowitz
2003-09-09  3:00   ` Andrew Cagney
2003-09-09  3:30     ` Daniel Jacobowitz
2003-09-09 17:24       ` Jim Blandy
2003-09-09 17:35         ` Daniel Jacobowitz [this message]
2003-09-10 19:48       ` Richard Henderson
2003-09-10 19:53         ` Daniel Jacobowitz
2003-09-10 21:03           ` Richard Henderson
2003-09-07 20:13 ` Mark Kettenis
2003-09-09  3:00   ` Andrew Cagney
2003-09-07 21:17 ` Richard Henderson

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=20030909173543.GA5722@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@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