From 0ecdca38bc62f60f961ab4d14c711b4c9ffd00e7 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 13 Jun 2021 22:42:49 -0400 Subject: sim: move trace init to dynamic modules.c Use the new modules.c framework to find & initialize this module. --- sim/common/ChangeLog | 7 +++++++ sim/common/sim-module.c | 3 --- sim/common/sim-trace.c | 6 ++++-- sim/common/sim-trace.h | 3 --- 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 + * 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 + * 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. -- cgit v1.1