From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2343 invoked by alias); 2 Jul 2004 22:13:22 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 2306 invoked from network); 2 Jul 2004 22:13:20 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 2 Jul 2004 22:13:20 -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 i62MDKe1021639 for ; Fri, 2 Jul 2004 18:13:20 -0400 Received: from zenia.home.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 i62MDJ024203; Fri, 2 Jul 2004 18:13:19 -0400 To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: make sim interface use gdbarch methods for collect/supply References: <40E57CDF.8090809@gnu.org> From: Jim Blandy Date: Fri, 02 Jul 2004 22:13:00 -0000 In-Reply-To: <40E57CDF.8090809@gnu.org> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-07/txt/msg00019.txt.bz2 Andrew Cagney writes: > > At the moment, remote-sim.c's gdbsim_fetch_register and > > gdbsim_store_register functions assume that the simulator's register > > set (as visible via sim_fetch_register and sim_store_register) > > corresponds exactly to GDB's raw register set. This patch is meant to > > remove that assumption. > > Why do we need this extra level of indirection? Since gdb/sim are > paired at the source code level, we can simply change the gdb/sim > interface. You mean (in this case) just go in and tweak sim/ppc/sim_calls.c so that the sim's register set (as viewed by sim_fetch_register and sim_store_register) does match GDB's raw regcache? It seems to me that one ought to be able to rearrange an architecture's raw regcache without changing code outside the gdb directory: it's supposed to be an internal interface. If the implementations of sim_* in the 'sim' subtree are considered internal to GDB, then that seems like a misstructuring.