From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22523 invoked by alias); 5 Oct 2004 14:02:54 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 21721 invoked from network); 5 Oct 2004 14:02:43 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 5 Oct 2004 14:02:43 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CEptb-0003Xl-Du; Tue, 05 Oct 2004 10:02:27 -0400 Date: Tue, 05 Oct 2004 14:03:00 -0000 From: Daniel Jacobowitz To: Fabian Cenedese Cc: gdb@sources.redhat.com Subject: Re: View registers from stack frames Message-ID: <20041005140227.GA13586@nevyn.them.org> Mail-Followup-To: Fabian Cenedese , gdb@sources.redhat.com References: <5.2.0.9.1.20041005142840.01d03818@NT_SERVER> <5.2.0.9.1.20041005142840.01d03818@NT_SERVER> <5.2.0.9.1.20041005154532.01d52ec0@NT_SERVER> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.2.0.9.1.20041005154532.01d52ec0@NT_SERVER> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-10/txt/msg00087.txt.bz2 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