X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Fcommon%2Fsim-module.c;h=35eb32a65ff13857e001f99597ed83af88754d9f;hb=501eef1260d7e203ba1e555ba94ec918d7c32725;hp=970e7258233c73eb536dec86ba06c9681ccf4c36;hpb=e98fe4f7b54cbdf29aef9287bbb1bea8801dd05a;p=deliverable%2Fbinutils-gdb.git diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c index 970e725823..35eb32a65f 100644 --- a/sim/common/sim-module.c +++ b/sim/common/sim-module.c @@ -23,11 +23,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "sim-options.h" #include "sim-assert.h" -/* start-sanitize-am30 */ #if WITH_HW #include "sim-hw.h" #endif -/* end-sanitize-am30 */ #include "libiberty.h" @@ -35,6 +33,9 @@ with this program; if not, write to the Free Software Foundation, Inc., static MODULE_INSTALL_FN * const modules[] = { standard_install, sim_events_install, +#ifdef SIM_HAVE_MODEL + sim_model_install, +#endif #if WITH_ENGINE sim_engine_install, #endif @@ -55,17 +56,12 @@ static MODULE_INSTALL_FN * const modules[] = { #if WITH_SCACHE scache_install, #endif -#ifdef SIM_HAVE_MODEL - sim_model_install, -#endif #ifdef SIM_HAVE_BREAKPOINTS sim_break_install, #endif - /* start-sanitize-am30 */ #if WITH_HW sim_hw_install, #endif - /* end-sanitize-am30 */ /* Configured in [simulator specific] additional modules. */ #ifdef MODULE_LIST MODULE_LIST @@ -116,9 +112,6 @@ sim_post_argv_init (SIM_DESC sd) SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); SIM_ASSERT (STATE_MODULES (sd) != NULL); - if (sim_module_init (sd) != SIM_RC_OK) - return SIM_RC_FAIL; - /* Set the cpu->state backlinks for each cpu. */ for (i = 0; i < MAX_NR_PROCESSORS; ++i) { @@ -126,6 +119,9 @@ sim_post_argv_init (SIM_DESC sd) CPU_INDEX (STATE_CPU (sd, i)) = i; } + if (sim_module_init (sd) != SIM_RC_OK) + return SIM_RC_FAIL; + return SIM_RC_OK; }