]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: move profile init to dynamic modules.c
authorMike Frysinger <vapier@gentoo.org>
Mon, 14 Jun 2021 02:43:54 +0000 (22:43 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 30 Jun 2021 16:38:39 +0000 (12:38 -0400)
Use the new modules.c framework to find & initialize this module.

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

index ee6d97daf76b5373f9307774dec9fe3d9110064c..c3c7d3e7b5413716a9072c2663f3b12de79f98f8 100644 (file)
@@ -1,3 +1,10 @@
+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.
index d9d08043828df93e958165048af5ff43c9e31fc1..120785e769067a0334dd29b01127bd66a1720df5 100644 (file)
@@ -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,
index f2d65e09303017e7bc7666e21b054b3cbdac7f83..3a8ed1f2567fdd6ec56a4c6b892a1a0f51c9e338 100644 (file)
@@ -1216,10 +1216,12 @@ profile_info (SIM_DESC sd, int verbose)
 
 }
 \f
-/* 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;
 
index 17017c469a4a29be821dfc5fa6320068019eb942..06cdd355557eb9abdf6f82b6ea8030ead1131884 100644 (file)
@@ -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