[RFA/alpha] Fetch register from the right frame

Daniel Jacobowitz drow@false.org
Wed Dec 1 05:10:00 GMT 2004


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



More information about the Gdb-patches mailing list