This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA/alpha] Fetch register from the right frame
- From: Daniel Jacobowitz <drow at false dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 1 Dec 2004 00:10:50 -0500
- Subject: Re: [RFA/alpha] Fetch register from the right frame
- References: <20041201024220.GD1204@adacore.com>
On Tue, Nov 30, 2004 at 06:42:20PM -0800, Joel Brobecker wrote:
> I tracked the problem to alpha_heuristic_frame_prev_register():
> Basically, after having verified that the register we'd like to fetch
> has not been saved in by the next frame, we try to fetch the value
> of the register inside the next frame. But instead, what we do, is
> that we actually fetch the value of the register for the frame
> *following* the next frame. Oups!
The patch seems OK to me. This is consistent with what other targets
do, also.
I have to stare at this a little bit each time... prev_register takes a
NEXT_FRAME argument. It is unwinding from THIS frame - which is not
one of its arguments - using THIS_CACHE. That's because a frame is
responsible for its own ID and the previous frame's registers. By the
time prev_register is called we have THIS frame available, but passing
it wouldn't do much good.
> 2004-11-30 Joel Brobecker <brobecker@gnat.com>
>
> * alpha-tdep.c (alpha_heuristic_frame_prev_register): Fetch
> the register value from the correct frame.
>
> Tested on alpha-tru64 5.1, fixes the problem above, no regression
> in the testsuite.
>
> OK to apply?
Yes.
--
Daniel Jacobowitz