View registers from stack frames

Kevin Buettner kevinb@redhat.com
Sat Oct 16 15:11:00 GMT 2004


On Tue, 12 Oct 2004 08:56:40 +0200
Fabian Cenedese <Cenedese@indel.ch> wrote:

> >Looking at it another way, the reason that PC and LR are the same
> >value for frames other than the topmost frame (excluding possible
> >sigtramp frames, where they may in fact be different), is because LR
> >changes over the lifetime of the function.  GDB is reporting this as
> >accurately as it can.
> 
> Thanks for your extensive explanation, it looks more clear now why
> it is the way it is. The value I assumed to be in LR (PC in last frame)
> is still reported from gdb as "saved PC". Is there another possibility
> to get this value than the stack frame info? Is this maybe stored in
> some gdb internal variable?

>From the stack?  If I'm not mistaken, the saved LR value should be at
$sp+4.

I'm not aware of any GDB internal variables which hold this value.

Kevin



More information about the Gdb mailing list