This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Andrew

2004-06-30 Jim Blandy <jimb@redhat.com>

	Don't assume that the sim's register set and GDB's raw register
	set have the same layout.
	* gdbarch.sh (sim_supply_register, sim_collect_register): New
	methods.  Have gdbarch.c #include regcache.h.
	* gdbarch.c, gdbarch.h: Regenerate.
	* remote-sim.c (gdbsim_fetch_register): Pass the register value
	collected from the sim to GDB via the new gdbarch methods.
	* Makefile.in (gdbarch.o): Update dependencies.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]