aboutsummaryrefslogtreecommitdiff
path: root/sim/common/run.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-08-25 23:14:25 +0000
committerAndrew Cagney <cagney@redhat.com>1997-08-25 23:14:25 +0000
commit247fccdeb54a09a14287b2e829511803ad9d7cc1 (patch)
treec992df7132ca0c315cbcfd5ad81bbc4f16675936 /sim/common/run.c
parent04f295b64859a6c6b01739fc4dd7fddce42db8d9 (diff)
downloadgdb-247fccdeb54a09a14287b2e829511803ad9d7cc1.zip
gdb-247fccdeb54a09a14287b2e829511803ad9d7cc1.tar.gz
gdb-247fccdeb54a09a14287b2e829511803ad9d7cc1.tar.bz2
Add ABFD argument to sim_open call. Pass through to sim_config so
that image properties such as endianness can be checked. More strongly document the expected behavour of each of the sim_* interfaces. Add default endian argument to simulator config macro SIM_AC_OPTION_ENDIAN. Use in sim_config.
Diffstat (limited to 'sim/common/run.c')
-rw-r--r--sim/common/run.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sim/common/run.c b/sim/common/run.c
index dff278d..3f032d3 100644
--- a/sim/common/run.c
+++ b/sim/common/run.c
@@ -58,7 +58,6 @@ static char *myname;
/* NOTE: sim_size() and sim_trace() are going away */
-extern void sim_size PARAMS ((int i));
extern int sim_trace PARAMS ((SIM_DESC sd));
extern int getopt ();
@@ -104,6 +103,12 @@ main (ac, av)
no_args[2] = "set-later";
#endif
+ /* FIXME: This is currently being migrated into sim_open.
+ Simulators that use functions such as sim_size() still require
+ this. */
+ default_callback.init (&default_callback);
+ sim_set_callbacks (&default_callback);
+
/* FIXME: This is currently being rewritten to have each simulator
do all argv processing. */
@@ -212,8 +217,7 @@ main (ac, av)
/* Ensure that any run-time initialisation that needs to be
performed by the simulator can occur. */
- default_callback.init (&default_callback);
- sd = sim_open (SIM_OPEN_STANDALONE, &default_callback, sim_argv);
+ sd = sim_open (SIM_OPEN_STANDALONE, &default_callback, abfd, sim_argv);
if (sd == 0)
exit (1);