This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: View registers from stack frames


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]