From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21992 invoked by alias); 2 Apr 2007 17:09:28 -0000 Received: (qmail 21983 invoked by uid 22791); 2 Apr 2007 17:09:28 -0000 X-Spam-Check-By: sourceware.org Received: from de01egw02.freescale.net (HELO de01egw02.freescale.net) (192.88.165.103) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 02 Apr 2007 18:09:17 +0100 Received: from de01smr02.am.mot.com (de01smr02.freescale.net [10.208.0.151]) by de01egw02.freescale.net (8.12.11/de01egw02) with ESMTP id l32H92b7017564; Mon, 2 Apr 2007 10:09:02 -0700 (MST) Received: from postal.somerset.sps.mot.com ([163.12.132.5]) by de01smr02.am.mot.com (8.13.1/8.13.0) with ESMTP id l32H91sl010924; Mon, 2 Apr 2007 12:09:02 -0500 (CDT) Received: from ld0159-tx32 (ld0159-tx32 [10.82.19.109]) by postal.somerset.sps.mot.com (8.11.0/8.11.0) with ESMTP id l32H9KL13718; Mon, 2 Apr 2007 12:09:20 -0500 (CDT) Date: Mon, 02 Apr 2007 17:09:00 -0000 From: "Anmol P. Paralkar" To: Daniel Jacobowitz cc: gdb@sourceware.org Subject: Re: In a remote debug session, how do I get to see fresh register values each time I do a 'show all-registers'? In-Reply-To: <20070402021816.GA7828@caradoc.them.org> Message-ID: References: <20070402021816.GA7828@caradoc.them.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00012.txt.bz2 On Sun, 1 Apr 2007, Daniel Jacobowitz wrote: > On Sun, Apr 01, 2007 at 08:16:39PM -0500, Anmol P. Paralkar wrote: >> Hello, > >> I am using GDB 6.6, (ppc64-elf) to remote debug linux running >> on a PowerPC simulator. I can read the values of the GPR's in >> the simulator and upon a 'show all-registers', I do see that >> the registers have values as expected. > >> However, on issuing a 'show all-registers' subsequently, I see >> GDB displaying the resgister values it displayed earlier - not >> the ones that the simulator now shows. What do I need to do to >> force GDB to get the fresh set of register values? > > What has happened to change the registers? Did the program run, or > are the registers changing while GDB thinks the simulator is stopped? > > In the first case, it's a GDB bug. In the second case, try the > flushregs command. flushregs is exactly what I needed. Thank you. (Looking it up also made me aware of Appendix C: Maintenance commands). In the first case, please note that I *do* see behaviour as expected. (Sorry about not being clear, I should perhaps have worded it thus: "To begin with, I can read the values of the GPR's in the simulator and upon a 'show all-registers', I do see that the registers have values as expected. Then, later on, as the program (viz. linux) runs, and the simulator displays the changed register values, I issue a 'show all-registers' again in GDB, hoping to see the new register values that the simulator now displays, but GDB continues to display the old values it displayed). [=> flushregs]. Regards, Anmol P. Paralkar