From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3108 invoked by alias); 19 Jul 2004 18:50:06 -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 3100 invoked from network); 19 Jul 2004 18:50:05 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 19 Jul 2004 18:50:05 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i6JIo5e3023023 for ; Mon, 19 Jul 2004 14:50:05 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i6JIo3a25861; Mon, 19 Jul 2004 14:50:04 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id A1D372B9D; Mon, 19 Jul 2004 14:50:09 -0400 (EDT) Message-ID: <40FC17E1.4050007@gnu.org> Date: Mon, 19 Jul 2004 18:59:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Xinan Tang Cc: gdb@sources.redhat.com Subject: Re: "which function is called when updating a register?" References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-07/txt/msg00246.txt.bz2 > Hi > > Thanks for the reply. > > My problem is that after I building a new target, I could not see the > registers being updated except PC. For example, after I did "set $sp = > 0x80001000", and then "info reg", I still saw $sp is ZERO. > > I am trying to fig out what was wrong with my build. One way to do this is > to trace the simulator execution. However I don't have a clear picture about > the interface between the simulator execution and gdb. For example, which > data structures are read by "info reg" command and which ones are touched by > the simulator. How could GDB get those register content being updated by the > simulator? When the inferior (simulator) is resumed, GDB flushes its internal register cache (target_registers_changed). This causes GDB to always fetch the latest register values found in the simulator. Andrew