Patch to provide m68k simulator to gdb
Andrew Cagney
ac131313@cygnus.com
Thu Mar 1 11:54:00 GMT 2001
Will Cohen wrote:
>
> There are a number of changes between the old interfaces used by m68k
> (and sh) and the newer simulators. Using nrun.c requires a number of
> other things to be modified. Is there there some documentation that
> describes the various defines and functions required by this newer
> interface? Or is the situation "The code IS the documentation"? If
> "The code IS the documentation," which simulator is the best one to
> model the changes after?
>
> I would like to remove these hard-coded numbers in the
> sim_fetch_registers and sim_store_register functions. Where should
> REGISTER_SIM_REGNO be defined. I couldn't find an example of its
> definition in the version of gdb I am using.
Unfortunatly, ``the code IS the documentation''. The mn10300 may be
best although others probably have better suggestions.
REGISTER_SIM_REGNO would be defined as part of gdb/config/m68k/tm-m68k.h
and friends. It would map onto a function. To decide if you need
REGISTER_SIM_REGNO, check the gdb/config/m68k/tm-*.h to see if there is
more than one defintion of REGISTER_BYTE and/or register numbering.
Hmm, looks like it only appears in tm-m68k.h (correct?).
I would lay out include/sim-m68k.h to match the register numbering
implied by tm-m68k.h:REGISTER_BYTE(REGNUM). If an m68k target ever
re-orders its registers then that target can implement
REGISTER_SIM_REGNO to map that numbering onto the standard. Hopefully
no one will do that but if they do the sim side is ready.
Andrew
More information about the Gdb-patches
mailing list