This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFA: make sim interface use gdbarch methods for collect/supply
- From: Jim Blandy <jimb at redhat dot com>
- To: Andrew Cagney <cagney at gnu dot org>
- Cc: gdb-patches at sources dot redhat dot com
- Date: 02 Jul 2004 17:12:22 -0500
- Subject: Re: RFA: make sim interface use gdbarch methods for collect/supply
- References: <vt2vfh9avzo.fsf@zenia.home> <40E57CDF.8090809@gnu.org>
Andrew Cagney <cagney@gnu.org> 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.