/* List of all modules. */
static MODULE_INSTALL_FN * const modules[] = {
standard_install,
+ sim_events_install,
#if WITH_ENGINE
sim_engine_install,
#endif
/* FIXME: should handle flatmem as well FLATMEM */
sim_memopt_install,
#endif
- sim_events_install,
#if WITH_WATCHPOINTS
sim_watchpoint_install,
#endif
#if WITH_SCACHE
scache_install,
#endif
-#ifdef SIM_HAVE_MODEL /* FIXME: temporary */
+#ifdef SIM_HAVE_MODEL
model_install,
+#endif
+#ifdef SIM_HAVE_BREAKPOINTS
+ sim_break_install,
#endif
/* Configured in [simulator specific] additional modules. */
#ifdef MODULE_LIST
return SIM_RC_OK;
}
\f
-/* Install all modules. */
+/* Install all modules.
+ If this fails, no modules are left installed. */
SIM_RC
sim_module_install (SIM_DESC sd)
for (modp = modules; *modp != NULL; ++modp)
{
if ((*modp) (sd) != SIM_RC_OK)
- return SIM_RC_FAIL;
+ {
+ sim_module_uninstall (sd);
+ return SIM_RC_FAIL;
+ }
}
return SIM_RC_OK;
}