This is the mail archive of the gdb@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: Simulator help


Hi,

I was trying to understand the code of various simulators used by gdb.
When I was studying the code for the h8300 simulator, I found a writecode.c
file. This file though it exists does not seem to be compiled through the Makefile.in in that directory.
It was probably used as part of the initial work and then discarded. No one's gone back and deleted it :-/

Looking  in the other directories, say sh or z8k, I found, there is a
gencode.c
or a writecode.c respectively, and these files are invoked explicitly with
various
options to create some target specific files.
Try m68hc11 as it is far more recent.
As alternatives there are igen based simulators (MIPS, mn10300).


Like in the sh case, compiling and then executing the executable with -x
gives
the switch statement, while -s outputs the jump-table.

Is the writecode.c in h8300 useful or is it redundant or obsolete stuff.
Do I need to study the source code of gdb to be able to understand the
simulator.
My guess was that the simulator would be wholly defined inside the sim
directory.
You're correct. See include/gdb/remote-sim.h for the iterface that GDB uses.

If you could point me to any H8 specific documentation, it would be very
useful.
Me to!

Andrew



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