This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/rfa:rs6000] Don't use ->prev
- From: Kevin Buettner <kevinb at redhat dot com>
- To: Andrew Cagney <ac131313 at cygnus dot com>, gdb-patches at sources dot redhat dot com, Kevin Buettner <kevinb at redhat dot com>
- Date: Mon, 15 Apr 2002 00:59:22 -0700
- Subject: Re: [patch/rfa:rs6000] Don't use ->prev
- References: <3CB9B3B1.90007@cygnus.com>
On Apr 14, 12:52pm, Andrew Cagney wrote:
> The rs6000 has me puzzled. I think the ->frame contains the address of
> the wrong end of the frame! If ->frame pointed at the frame's start,
> the code below wouldn't even be needed. Anyway, I've changed it to use
> frame_chain() (I don't see regressions on NetBSD/PPC. The other
> possability would be to risk a (recursive) get_prev_frame() call.
>
> Anyway, is the rs6000 ok?
>
[...]
> * rs6000-tdep.c (frame_get_saved_regs): Use rs6000_frame_chain()
> instead of ->prev.
I think that your patch is okay so long as you use FRAME_CHAIN()
instead of rs6000_frame_chain(). Note that FRAME_CHAIN() may be set
to something other than rs6000_frame_chain() depending upon the ABI / OS.
At the moment though, it doesn't really matter too much since the
case -- signal handler trampolines -- that calling FRAME_CHAIN gets
right is broken in frame_get_saved_regs() anyway. The Linux/PPC
target works around this deficiency by interposing some code which
computes the correct saved register locations for signal handler
callers instead of calling the rs6000_* version which invokes
rs6000_get_saved_register().
Kevin