aboutsummaryrefslogtreecommitdiff
path: root/sim/cris/sim-if.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/cris/sim-if.c')
-rw-r--r--sim/cris/sim-if.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c
index 9fb1e13..115ff21 100644
--- a/sim/cris/sim-if.c
+++ b/sim/cris/sim-if.c
@@ -127,17 +127,6 @@ static const OPTION cris_options[] =
{ {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL, NULL }
};
-/* Add the CRIS-specific option list to the simulator. */
-
-SIM_RC
-cris_option_install (SIM_DESC sd)
-{
- SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
- if (sim_add_option_table (sd, NULL, cris_options) != SIM_RC_OK)
- return SIM_RC_FAIL;
- return SIM_RC_OK;
-}
-
/* Handle CRIS-specific options. */
static SIM_RC
@@ -761,6 +750,13 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd,
return 0;
}
+ /* Add the CRIS-specific option list to the simulator. */
+ if (sim_add_option_table (sd, NULL, cris_options) != SIM_RC_OK)
+ {
+ free_state (sd);
+ return 0;
+ }
+
/* getopt will print the error message so we just have to exit if this fails.
FIXME: Hmmm... in the case of gdb we need getopt to call
print_filtered. */