aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-13 22:40:09 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-30 12:28:28 -0400
commit05d54a045c77ae24cf46327d3680a7c38b469351 (patch)
tree6c902241ac55d090278d4181b6e483806707bb2b /sim
parent9a39f7389d8971dc754e45a73128616a5346008c (diff)
downloadgdb-05d54a045c77ae24cf46327d3680a7c38b469351.zip
gdb-05d54a045c77ae24cf46327d3680a7c38b469351.tar.gz
gdb-05d54a045c77ae24cf46327d3680a7c38b469351.tar.bz2
sim: move engine init to dynamic modules.c
Use the new modules.c framework to find & initialize this module.
Diffstat (limited to 'sim')
-rw-r--r--sim/common/ChangeLog7
-rw-r--r--sim/common/sim-engine.c4
-rw-r--r--sim/common/sim-engine.h4
-rw-r--r--sim/common/sim-module.c1
4 files changed, 10 insertions, 6 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index e18d06b..5211321 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,12 @@
2021-06-30 Mike Frysinger <vapier@gentoo.org>
+ * sim-engine.c (sim_engine_install): Rename to ...
+ (sim_install_engine): ... this. New prototype.
+ * sim-engine.h (sim_engine_install): Delete.
+ * sim-module.c (early_modules): Delete sim_engine_install.
+
+2021-06-30 Mike Frysinger <vapier@gentoo.org>
+
* sim-config.h (WITH_MODEL): Delete.
(CURRENT_MODEL, MODEL_ISSUE_IGNORE, MODEL_ISSUE_PROCESS,
WITH_MODEL_ISSUE, CURRENT_MODEL_ISSUE): Likewise.
diff --git a/sim/common/sim-engine.c b/sim/common/sim-engine.c
index 83f41f0..2a0fb72 100644
--- a/sim/common/sim-engine.c
+++ b/sim/common/sim-engine.c
@@ -208,9 +208,11 @@ sim_engine_init (SIM_DESC sd)
return SIM_RC_OK;
}
+/* Provide a prototype to silence -Wmissing-prototypes. */
+SIM_RC sim_install_engine (SIM_DESC sd);
SIM_RC
-sim_engine_install (SIM_DESC sd)
+sim_install_engine (SIM_DESC sd)
{
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
sim_module_add_init_fn (sd, sim_engine_init);
diff --git a/sim/common/sim-engine.h b/sim/common/sim-engine.h
index 3ebf8ac..1feb8a6 100644
--- a/sim/common/sim-engine.h
+++ b/sim/common/sim-engine.h
@@ -153,8 +153,4 @@ extern int sim_engine_last_cpu_nr (SIM_DESC sd);
extern int sim_engine_nr_cpus (SIM_DESC sd);
-/* Establish the simulator engine */
-MODULE_INSTALL_FN sim_engine_install;
-
-
#endif
diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c
index 97d619c..f4b74fc 100644
--- a/sim/common/sim-module.c
+++ b/sim/common/sim-module.c
@@ -37,7 +37,6 @@ static MODULE_INSTALL_FN * const early_modules[] = {
standard_install,
sim_events_install,
sim_model_install,
- sim_engine_install,
#if WITH_TRACE_ANY_P
trace_install,
#endif