aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-13 22:43:54 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-30 12:38:39 -0400
commit953fac6481598d64087f45030f243374ba599099 (patch)
tree64f72319f14f0837ac7ec0d973db8d032e5d99e5 /sim
parent0ecdca38bc62f60f961ab4d14c711b4c9ffd00e7 (diff)
downloadgdb-953fac6481598d64087f45030f243374ba599099.zip
gdb-953fac6481598d64087f45030f243374ba599099.tar.gz
gdb-953fac6481598d64087f45030f243374ba599099.tar.bz2
sim: move profile 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-module.c3
-rw-r--r--sim/common/sim-profile.c6
-rw-r--r--sim/common/sim-profile.h3
4 files changed, 11 insertions, 8 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index ee6d97d..c3c7d3e 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,12 @@
2021-06-30 Mike Frysinger <vapier@gentoo.org>
+ * sim-module.c (early_modules): Delete profile_install.
+ * sim-profile.c (profile_install): Rename to ...
+ (sim_install_profile): ... this. New prototype.
+ * sim-profile.h (profile_install): Delete.
+
+2021-06-30 Mike Frysinger <vapier@gentoo.org>
+
* sim-module.c (early_modules): Delete trace_install.
* sim-trace.c (trace_install): Rename to ...
(sim_install_trace): ... this. New prototype.
diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c
index d9d0804..120785e 100644
--- a/sim/common/sim-module.c
+++ b/sim/common/sim-module.c
@@ -37,9 +37,6 @@ static MODULE_INSTALL_FN * const early_modules[] = {
standard_install,
sim_events_install,
sim_model_install,
-#if WITH_PROFILE
- profile_install,
-#endif
sim_core_install,
sim_memopt_install,
sim_watchpoint_install,
diff --git a/sim/common/sim-profile.c b/sim/common/sim-profile.c
index f2d65e0..3a8ed1f 100644
--- a/sim/common/sim-profile.c
+++ b/sim/common/sim-profile.c
@@ -1216,10 +1216,12 @@ profile_info (SIM_DESC sd, int verbose)
}
-/* Install profiling support in the simulator. */
+/* Provide a prototype to silence -Wmissing-prototypes. */
+SIM_RC sim_install_profile (SIM_DESC sd);
+/* Install profiling support in the simulator. */
SIM_RC
-profile_install (SIM_DESC sd)
+sim_install_profile (SIM_DESC sd)
{
int i;
diff --git a/sim/common/sim-profile.h b/sim/common/sim-profile.h
index 17017c4..06cdd35 100644
--- a/sim/common/sim-profile.h
+++ b/sim/common/sim-profile.h
@@ -102,9 +102,6 @@ SIM_RC sim_profile_set_option (SIM_DESC sd_, const char *name_, int idx_,
#define WITH_PROFILE_MEMORY_P 0
#endif
-/* Profiling install handler. */
-MODULE_INSTALL_FN profile_install;
-
/* Output format macros. */
#ifndef PROFILE_HISTOGRAM_WIDTH
#define PROFILE_HISTOGRAM_WIDTH 40