RFA: make sim interface use gdbarch methods for collect/supply

Jim Blandy jimb@redhat.com
Fri Jul 2 22:13:00 GMT 2004


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.



More information about the Gdb-patches mailing list