From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18240 invoked by alias); 19 Jul 2004 18:28:41 -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 18217 invoked from network); 19 Jul 2004 18:28:39 -0000 Received: from unknown (HELO intranet.tidalnetworks.net) (67.114.153.34) by sourceware.org with SMTP; 19 Jul 2004 18:28:39 -0000 Received: from xinanpc (dynamic-02 [172.16.128.2]) (authenticated bits=0) by intranet.tidalnetworks.net (8.12.8/8.12.8) with ESMTP id i6JITJAB024274; Mon, 19 Jul 2004 11:29:20 -0700 From: "Xinan Tang" To: "Andrew Cagney" Cc: Subject: RE: "which function is called when updating a register?" Date: Mon, 19 Jul 2004 18:50:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-reply-to: <40FAD034.8090003@gnu.org> X-SW-Source: 2004-07/txt/msg00245.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? Thanks --Xinan -----Original Message----- From: Andrew Cagney [mailto:cagney@gnu.org] Sent: Sunday, July 18, 2004 11:32 AM To: Xinan Tang Cc: gdb@sources.redhat.com Subject: Re: "which function is called when updating a register?" > Hi > > I set breakpoints on both: > > -- gdbsim_fetch_register and > -- gdbsim_store_register > > when single stepping the instruction execution, I noticed that > gdbsim_fetech_register was called but gdbsim_store_register. > > Which function is actually called to update a register content within gdb > using a built-in simulator? GDB rarely has the need to write to the inferiors registers (if it did gdbsim_store_register would be called though). Try something like: set $pc = 0 When the simulator is running a program it updates registers locally and directly. Andrew