diff options
author | Andrew Cagney <cagney@redhat.com> | 1997-08-25 23:14:25 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1997-08-25 23:14:25 +0000 |
commit | 247fccdeb54a09a14287b2e829511803ad9d7cc1 (patch) | |
tree | c992df7132ca0c315cbcfd5ad81bbc4f16675936 /sim/tic80/sim-calls.c | |
parent | 04f295b64859a6c6b01739fc4dd7fddce42db8d9 (diff) | |
download | gdb-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/tic80/sim-calls.c')
-rw-r--r-- | sim/tic80/sim-calls.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sim/tic80/sim-calls.c b/sim/tic80/sim-calls.c index 8f609ee..60659b92 100644 --- a/sim/tic80/sim-calls.c +++ b/sim/tic80/sim-calls.c @@ -52,6 +52,7 @@ struct sim_state simulation = { 0 }; SIM_DESC sim_open (SIM_OPEN_KIND kind, host_callback *callback, + struct _bfd *abfd, char **argv) { SIM_DESC sd = &simulation; @@ -73,6 +74,13 @@ sim_open (SIM_OPEN_KIND kind, return 0; } + /* establish the simulator configuration */ + if (sim_config (sd, abfd) != SIM_RC_OK) + { + sim_module_uninstall (sd); + return 0; + } + if (sim_post_argv_init (sd) != SIM_RC_OK) { /* Uninstall the modules to avoid memory leaks, @@ -89,9 +97,6 @@ sim_open (SIM_OPEN_KIND kind, memset (&STATE_CPU (sd, 0)->cia, 0, sizeof STATE_CPU (sd, 0)->cia); CPU_STATE (STATE_CPU (sd, 0)) = sd; - /* establish the simulator configuration */ - sim_config (sd, LITTLE_ENDIAN/*d30v always big endian*/); - #define TIC80_MEM_START 0x2000000 #define TIC80_MEM_SIZE 0x100000 |