From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23982 invoked by alias); 18 Jul 2004 19:32:05 -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 23975 invoked from network); 18 Jul 2004 19:32:04 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 18 Jul 2004 19:32:04 -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 i6IJW4e3032478 for ; Sun, 18 Jul 2004 15:32:04 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i6IJW3a08323; Sun, 18 Jul 2004 15:32:03 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 98F512B9D; Sun, 18 Jul 2004 15:32:04 -0400 (EDT) Message-ID: <40FAD034.8090003@gnu.org> Date: Sun, 18 Jul 2004 20:38: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/msg00235.txt.bz2 > 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