aboutsummaryrefslogtreecommitdiff
path: root/sim/cris
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-12-24 15:49:31 -0500
committerMike Frysinger <vapier@gentoo.org>2015-12-24 20:34:07 -0500
commit9db2b719087eb42cfb31018fe87657243f6185c9 (patch)
tree7beaaeebef0faa8cea69778165bc87ca3995f849 /sim/cris
parentcec19744887931294e9d4a1dfa4fa8bd42e57ae5 (diff)
downloadfsf-binutils-gdb-9db2b719087eb42cfb31018fe87657243f6185c9.zip
fsf-binutils-gdb-9db2b719087eb42cfb31018fe87657243f6185c9.tar.gz
fsf-binutils-gdb-9db2b719087eb42cfb31018fe87657243f6185c9.tar.bz2
sim: cris: move option install to sim_open
We've moved custom option install for other targets to sim_open, so update cris too. It's the last one using MODULE_LIST, so we can drop that from the common code too.
Diffstat (limited to 'sim/cris')
-rw-r--r--sim/cris/sim-if.c18
-rw-r--r--sim/cris/tconfig.h4
2 files changed, 7 insertions, 15 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. */
diff --git a/sim/cris/tconfig.h b/sim/cris/tconfig.h
index 8f82ac7..e512c3d 100644
--- a/sim/cris/tconfig.h
+++ b/sim/cris/tconfig.h
@@ -30,10 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* For MSPR support. FIXME: revisit. */
#define WITH_DEVICES 1
-#include "sim-module.h"
-extern MODULE_INSTALL_FN cris_option_install;
-#define MODULE_LIST cris_option_install,
-
#define SIM_HAVE_MODEL
/* This is a global setting. Different cpu families can't mix-n-match -scache