Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Fabian Cenedese <Cenedese@indel.ch>
Cc: gdb@sources.redhat.com
Subject: Re: View registers from stack frames
Date: Tue, 05 Oct 2004 14:03:00 -0000	[thread overview]
Message-ID: <20041005140227.GA13586@nevyn.them.org> (raw)
In-Reply-To: <5.2.0.9.1.20041005154532.01d52ec0@NT_SERVER>

On Tue, Oct 05, 2004 at 03:53:22PM +0200, Fabian Cenedese wrote:
> 
> >>With the stack commands (frame, up, down) I can select a different
> >>stack frame. Local variables and arguments (even with same name)
> >>have different values, depending on the stack frame number. But it
> >>seems that registers aren't corrected for previous stack frames. Is
> >>this correct? e.g. the PC and LR should change their value on every
> >>frame, and the PC was the last LR. But "info reg" always shows the
> >>same values. Is there any way to get the previous frame's registers?
> >>When I do "info frame x" I get something like "saved pc 0x..." so at
> >>least this information is available, why isn't this put into the register
> >>overview? And what about the other SPRs and GPRs?
> >
> >You've just described the expected and correct behavior.  That makes it sound like an architecture specific bug.  Which architecture system is this on, and can you post a transcript.
> 
> I'm using a self built gdb-6.1.1 for PPC-targets and cygwin. The
> communication with the target is over a stub-server to a PPC-board.

For PPC, try 6.2 instead.

> My question is: why do pc and lr (and all other registers) always show the same
> value even if I have selected another stack frame? I would have expected that pc
> changes to 0x60564 in frame 1 and 0x60408 in frame 2, lr likewise to 0x60408
> in frame 1 and 0x8c8a8 in frame 2. Why is this not the case? That's a little bit
> misleading. I would like not only to see variables and arguments in previous
> frames but also the registers.

As Andrew already explained, this is what is supposed to happen.  It
did not used to work but was fixed by the new frame architecture.

-- 
Daniel Jacobowitz


  reply	other threads:[~2004-10-05 14:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-05 12:48 Fabian Cenedese
2004-10-05 13:30 ` Andrew Cagney
2004-10-05 14:02   ` Fabian Cenedese
2004-10-05 14:03     ` Daniel Jacobowitz [this message]
2004-10-05 15:00       ` Fabian Cenedese
2004-10-05 17:57         ` Fabian Cenedese
2004-10-06  1:57           ` Andrew Cagney
2004-10-06  7:18             ` Fabian Cenedese
2004-10-06 16:41               ` Kevin Buettner
2004-10-07  9:04                 ` Fabian Cenedese
2004-10-11 19:21                   ` Kevin Buettner
2004-10-07 17:50 Xinan Tang
     [not found] <5.2.0.9.1.20041007134711.01d12d90@NT_SERVER>
     [not found] ` <20041007085738.45b5b55a@saguaro>
2004-10-08 10:14   ` Fabian Cenedese
2004-10-11 19:16     ` Kevin Buettner
2004-10-12 14:03       ` Fabian Cenedese
2004-10-16 15:11         ` Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041005140227.GA13586@nevyn.them.org \
    --to=drow@false.org \
    --cc=Cenedese@indel.ch \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox