Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: gdb-patches@gcc.gnu.org
Cc: randolph@tausq.org
Subject: Re: [patch/rfa] Fix some corner cases in hppa stack unwinding
Date: Tue, 08 Jun 2004 15:47:00 -0000	[thread overview]
Message-ID: <200406081546.i58Fkiir006691@hiauly1.hia.nrc.ca> (raw)

> p.s. it's probably possible to come up with a tricky test case where the
> unwinder will still break:
> 
> frame 0: sets/saves frame pointer, start unwinding after fp is set but
>          before it is saved
> frame 1 .. n-1: does not set/save frame pointer
> frame n: requires frame pointer to unwind properly (e.g. calls alloca())
> frame n+1 ... 
> 
> in this case frame n will not unwind properly because we cannot retrieve
> the correct fp from the stack (the one that has not yet been saved).

Under HP-UX when a frame pointer is needed, GCC 3.3 and later saves
the previous stack pointer (frame pointer) in the frame marker at
sp - (TARGET_64BIT ? -8 : -4).  This value is copied in dynamic stack
allocations.  Thus, you should be able to obtain the frame pointer
for frame 'n' from the frame marker.  You just need the address of
frame n-1 to access the frame marker of frame n.

This could also be done under linux if it is useful.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


             reply	other threads:[~2004-06-08 15:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-08 15:47 John David Anglin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-06-06 20:45 Randolph Chung
2004-06-07 14: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=200406081546.i58Fkiir006691@hiauly1.hia.nrc.ca \
    --to=dave@hiauly1.hia.nrc.ca \
    --cc=gdb-patches@gcc.gnu.org \
    --cc=randolph@tausq.org \
    /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