From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7706 invoked by alias); 30 Jun 2004 17:00:58 -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 7689 invoked from network); 30 Jun 2004 17:00:57 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 30 Jun 2004 17:00:57 -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 i5UH0ve1015939 for ; Wed, 30 Jun 2004 13:00:57 -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 i5UH0t015829; Wed, 30 Jun 2004 13:00:56 -0400 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: make sim interface use gdbarch methods for collect/supply References: <20040630155329.GA19452@nevyn.them.org> From: Jim Blandy Date: Wed, 30 Jun 2004 17:00:00 -0000 In-Reply-To: <20040630155329.GA19452@nevyn.them.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-06/txt/msg00703.txt.bz2 Daniel Jacobowitz writes: > On Wed, Jun 30, 2004 at 10:47:23AM -0500, Jim Blandy wrote: > > > > 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. > > > > Tested on i686-pc-linux-gnu x powerpc-eabispe (sim). > > We've got a whole lot of new mechanism for describing register sets. > Can't you use that instead of adding new supply/collect routines? I'd love to use some existing mechanism, but I couldn't see how to apply what I know of to this problem. Can you give me a pointer? If you mean the regset stuff: the sim doesn't present its registers in terms of a single structure that one could pass to a supply_regset_ftype or collect_regset_ftype value; you make one call to a sim function to transfer each register. I think what you're getting at is that SIM_COLLECT_REGISTER and SIM_SUPPLY_REGISTER will in general have to re-implement some of the raw/pseudo mapping. I agree that that's unfortunate, but it's inherent in the design: we can only collect and supply raw register values, and our raw regcache layout is not necessarily the same as the sim's register layout.