aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-13 22:42:49 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-30 12:34:01 -0400
commit0ecdca38bc62f60f961ab4d14c711b4c9ffd00e7 (patch)
treeb257de57c7ced5888c3cd5527907038cca1a6ccc
parent05d54a045c77ae24cf46327d3680a7c38b469351 (diff)
downloadgdb-0ecdca38bc62f60f961ab4d14c711b4c9ffd00e7.zip
gdb-0ecdca38bc62f60f961ab4d14c711b4c9ffd00e7.tar.gz
gdb-0ecdca38bc62f60f961ab4d14c711b4c9ffd00e7.tar.bz2
sim: move trace init to dynamic modules.c
Use the new modules.c framework to find & initialize this module.
-rw-r--r--sim/common/ChangeLog7
-rw-r--r--sim/common/sim-module.c3
-rw-r--r--sim/common/sim-trace.c6
-rw-r--r--sim/common/sim-trace.h3
4 files changed, 11 insertions, 8 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 5211321..ee6d97d 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 trace_install.
+ * sim-trace.c (trace_install): Rename to ...
+ (sim_install_trace): ... this. New prototype.
+ * sim-trace.h (trace_install): Delete.
+
+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.
diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c
index f4b74fc..d9d0804 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_TRACE_ANY_P
- trace_install,
-#endif
#if WITH_PROFILE
profile_install,
#endif
diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c
index 2c37989..9ebb86d 100644
--- a/sim/common/sim-trace.c
+++ b/sim/common/sim-trace.c
@@ -436,10 +436,12 @@ trace_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt,
return SIM_RC_OK;
}
-/* Install tracing support. */
+/* Provide a prototype to silence -Wmissing-prototypes. */
+SIM_RC sim_install_trace (SIM_DESC sd);
+/* Install tracing support. */
SIM_RC
-trace_install (SIM_DESC sd)
+sim_install_trace (SIM_DESC sd)
{
int i;
diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h
index c89084e..c73dc6d 100644
--- a/sim/common/sim-trace.h
+++ b/sim/common/sim-trace.h
@@ -142,9 +142,6 @@ enum {
#define WITH_TRACE_SYSCALL_P WITH_TRACE_P (TRACE_SYSCALL_IDX)
#define WITH_TRACE_REGISTER_P WITH_TRACE_P (TRACE_REGISTER_IDX)
#define WITH_TRACE_DEBUG_P WITH_TRACE_P (TRACE_DEBUG_IDX)
-
-/* Tracing install handler. */
-MODULE_INSTALL_FN trace_install;
/* Struct containing all system and cpu trace data.