sim: move trace init to dynamic modules.c
authorMike Frysinger <vapier@gentoo.org>
Mon, 14 Jun 2021 02:42:49 +0000 (22:42 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 30 Jun 2021 16:34:01 +0000 (12:34 -0400)
Use the new modules.c framework to find & initialize this module.

sim/common/ChangeLog
sim/common/sim-module.c
sim/common/sim-trace.c
sim/common/sim-trace.h

index 5211321b9491e32cc962d53408dc4f2405723336..ee6d97daf76b5373f9307774dec9fe3d9110064c 100644 (file)
@@ -1,3 +1,10 @@
+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 ...
index f4b74fcfe3a2c0aaac35389569b1cb44b9124e86..d9d08043828df93e958165048af5ff43c9e31fc1 100644 (file)
@@ -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
index 2c3798933db34fc724c56c96aaf9c3dda8af5bc3..9ebb86d70e2e173776193ad224aee4d8cc4fe433 100644 (file)
@@ -436,10 +436,12 @@ trace_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt,
   return SIM_RC_OK;
 }
 \f
-/* 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;
 
index c89084e94401f4589f00412446e52aeec23ee6a9..c73dc6d367dab0c36d2ba939dba89088c426ca34 100644 (file)
@@ -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;
 \f
 /* Struct containing all system and cpu trace data.