Re: Best way to check whether the "sim" is running standalone or by GDB

Nick Clifton <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
Hi William,

> What constitute the standalone code ?> 
> in fact, to port the simulator, I only had to implement the following:
> sim_engine_run ()
> sim_open ()
> sim_create_inferior ()
> 
> All the above functions are both used when the sim is running
> "standalone" or by "GDB".
> 
> Is there another function I can define that will only be used when the
> sim is running "standalone" ?

Presumably you are using a Makefile.in like the other simulators.
In there you define SIM_RUN_OBJS to contain the object files that
are only part of the standalone simulator.  So you could use a 
function in one of those object files.  main() would be the obvious
choice, if you are using your own.  Or else something called from
the main() defined in common/nrun.c.

Cheers
  Nick
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.