]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: dv-sockser: push module init prototype down
authorMike Frysinger <vapier@gentoo.org>
Sun, 15 Mar 2015 06:55:08 +0000 (02:55 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sun, 15 Mar 2015 07:05:05 +0000 (03:05 -0400)
Pull out the duplicated dv_sockser_install prototype from the tconfig.in
files and put it in the one place it gets used -- sim-module.c.  This is
still arguably incorrect, but it's better than the status quo where the
tconfig.in has to include header files and duplicate the dv-sockser func.
The tconfig header is meant to be simple and contain a target defines.

24 files changed:
include/gdb/ChangeLog
include/gdb/remote-sim.h
sim/bfin/ChangeLog
sim/bfin/tconfig.in
sim/common/ChangeLog
sim/common/dv-sockser.h
sim/common/sim-module.c
sim/common/sim-module.h
sim/cris/ChangeLog
sim/cris/tconfig.in
sim/frv/ChangeLog
sim/frv/tconfig.in
sim/iq2000/ChangeLog
sim/iq2000/tconfig.in
sim/lm32/ChangeLog
sim/lm32/Makefile.in
sim/m32r/ChangeLog
sim/m32r/tconfig.in
sim/mips/ChangeLog
sim/mips/tconfig.in
sim/mn10300/ChangeLog
sim/mn10300/tconfig.in [deleted file]
sim/sh64/ChangeLog
sim/sh64/tconfig.in

index 694cd5d62d67905b34a05acd291fda359b4b9d3b..88bd15c60332456a0bb065f56f3c38a56b6baba8 100644 (file)
@@ -1,3 +1,7 @@
+2015-05-15  Mike Frysinger  <vapier@gentoo.org>
+
+       * remote-sim.h (struct host_callback_struct): Define.
+
 2015-01-31  Doug Evans  <xdje42@gmail.com>
 
        * section-scripts.h: Remove "future extension" comment.
index 3dca380e4b757f0035835d9e488e11dc2033972f..bd8ddc04d9806104beb9bd1466b228d2dc3cb169 100644 (file)
@@ -60,9 +60,10 @@ typedef enum {
 } SIM_RC;
 
 
-/* The bfd struct, as an opaque type.  */
+/* Some structs, as opaque types.  */
 
 struct bfd;
+struct host_callback_struct;
 
 
 /* Main simulator entry points.  */
index ee5f81c0e31355704af6db701b8dca5d338d852b..4e2077d310231a8e420e669754c29c4d5b93913c 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-15  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.in: Delete includes.
+       [HAVE_DV_SOCKSER]: Delete.
+
 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
 
        * bfin-sim.c (decode_dsp32alu_0): Change v to bu32.
index 130707a90a8c6bd81fbfe37504a7fd92c58013aa..d28fd8d9f59df3214331b94e6f9f91b71c61dc4e 100644 (file)
@@ -7,18 +7,6 @@
    Common sim core by default sets hw_system_cpu to NULL for WITH_HW.  */
 #define WITH_DEVICES 1
 
-/* FIXME: This is unnecessarily necessary: */
-#include "ansidecl.h"
-#include "gdb/callback.h"
-#include "gdb/remote-sim.h"
-#include "sim-module.h"
-
-/* FIXME: Revisit.  */
-#ifdef HAVE_DV_SOCKSER
-MODULE_INSTALL_FN dv_sockser_install;
-#define MODULE_LIST dv_sockser_install,
-#endif
-
 /* ??? Temporary hack until model support unified.  */
 #define SIM_HAVE_MODEL
 
index cd51d62e3f671d60f52cecd7660f9c891ffdccb2..08d3b933d10c5d897bd6c02d9efd0dd813791c99 100644 (file)
@@ -1,3 +1,11 @@
+2015-03-15  Mike Frysinger  <vapier@gentoo.org>
+
+       * dv-socker.h (dv_sockser_install): Declare.
+       * sim-module.c: Include config.h.
+       [HAVE_DV_SOCKSER]: Include dv-sockser.h.
+       (modules) [HAVE_DV_SOCKSER]: Add dv_sockser_install.
+       * sim-module.h: Include gdb/remote-sim.h.
+
 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
 
        * Make-common.in (BUILT_SRC_FROM_COMMON): Delete.
index 8ad99810ee87284f02799df206ab38447f58636d..cc4fd741ac57f2a22b039493f031d98d76a1eafb 100644 (file)
@@ -30,4 +30,6 @@ int dv_sockser_write (SIM_DESC, unsigned char);
 int dv_sockser_write_buffer (SIM_DESC, const unsigned char *, unsigned);
 int dv_sockser_read (SIM_DESC);
 
+SIM_RC dv_sockser_install (SIM_DESC);
+
 #endif /* DV_SOCKSER_H */
index 2f7ac5feeb651bd34f70beb3ebff231138449171..fd9b587967a0a33e929438ed74b058ae3d20d103 100644 (file)
@@ -19,6 +19,7 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include "config.h"
 #include "sim-main.h"
 #include "sim-io.h"
 #include "sim-options.h"
@@ -28,6 +29,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-hw.h"
 #endif
 
+#ifdef HAVE_DV_SOCKSER
+/* TODO: Shouldn't have device models here.  */
+#include "dv-sockser.h"
+#endif
+
 #include "libiberty.h"
 
 /* List of all modules.  */
@@ -59,6 +65,10 @@ static MODULE_INSTALL_FN * const modules[] = {
 #endif
 #if WITH_HW
   sim_hw_install,
+#endif
+#ifdef HAVE_DV_SOCKSER
+  /* TODO: Shouldn't have device models here.  */
+  dv_sockser_install,
 #endif
   /* Configured in [simulator specific] additional modules.  */
 #ifdef MODULE_LIST
index 9979ec0819b839bb138592e314a13a55af956c56..53b8306cb6ff1fd2ca63f4699a8cf50fbc56652d 100644 (file)
@@ -30,6 +30,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
    TODO: Add facilities for saving/restoring state to/from a file.  */
 
+#include "gdb/remote-sim.h"
 
 /* Various function types.  */
 
index e1f3f9efa3bcba3949a7ebad597449c886113bb1..9432e32ef90872b70083669b1c3bd2527de6be19 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-15  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.in: Delete most includes.
+       [HAVE_DV_SOCKSER]: Delete.
+
 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (SIM_RUN_OBJS): Delete.
index 77499935e6c9477ce96070c79b24508da13c174f..8f82ac7932b604ca3485ba460f76f8decf2d0adc 100644 (file)
@@ -20,11 +20,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef CRIS_TCONFIG_H
 #define CRIS_TCONFIG_H
 
-#include "ansidecl.h"
-#include "gdb/callback.h"
-#include "gdb/remote-sim.h"
-#include "sim-module.h"
-
 /* There's basically a a big ??? FIXME: CHECK THIS on everything in this
    file.  I just copied it from m32r, pruned some stuff and added
    HAVE_MODEL because it seemed useful.  */
@@ -35,15 +30,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 /* For MSPR support.  FIXME: revisit.  */
 #define WITH_DEVICES 1
 
+#include "sim-module.h"
 extern MODULE_INSTALL_FN cris_option_install;
-
-/* FIXME: Revisit.  */
-#ifdef HAVE_DV_SOCKSER
-extern MODULE_INSTALL_FN dv_sockser_install;
-#define MODULE_LIST dv_sockser_install, cris_option_install,
-#else
 #define MODULE_LIST cris_option_install,
-#endif
 
 #define SIM_HAVE_MODEL
 
index d54bb94312db7cc9763840aea3a85e4555246112..d178047a619802b5f83bb37899ebd3ae8c3de533 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-15  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.in [HAVE_DV_SOCKSER]: Delete.
+
 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (SIM_RUN_OBJS): Delete.
index a53ad23727c994b35dd8a39f0840fb921941e3e8..b31043cd82a39b4c2cc07090dab021ca5485772d 100644 (file)
 /* For MSPR support.  FIXME: revisit.  */
 #define WITH_DEVICES 1
 
-/* FIXME: Revisit.  */
-#ifdef HAVE_DV_SOCKSER
-MODULE_INSTALL_FN dv_sockser_install;
-#define MODULE_LIST dv_sockser_install,
-#endif
-
 #if 0
 /* Enable watchpoints.  */
 #define WITH_WATCHPOINTS 1
index 58a8605805f93801ba394297b205478612f65e95..b682fac02babf9c295f374b6d81591ba78e81c77 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-15  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.in [HAVE_DV_SOCKSER]: Delete.
+
 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (SIM_RUN_OBJS): Delete.
index 5ab608cf95110ba7fd63f51834c9963112498daf..0081bb4394f9ba37a417d2153ea75975dabb5d22 100644 (file)
 /* For MSPR support.  FIXME: revisit.  */
 #define WITH_DEVICES 0
 
-/* FIXME: Revisit.  */
-#ifdef HAVE_DV_SOCKSER
-MODULE_INSTALL_FN dv_sockser_install;
-#define MODULE_LIST dv_sockser_install,
-#endif
-
 #if 0
 /* Enable watchpoints.  */
 #define WITH_WATCHPOINTS 1
index 8567e61e4df1aae534b08d2ab3a9c43217df3c74..954cd836d7dadfab7b692e33446a0dc0c2924ad9 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-15  Mike Frysinger  <vapier@gentoo.org>
+
+       * Makefile.in (SIM_OBJS): Add @SIM_DV_SOCKSER_O@.
+
 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (SIM_RUN_OBJS): Delete.
index 60420a1d0ad30d3ff10fae6fbba828ecd71c4f6d..61e41373a7dc028ac7e17a6bd94a392b9754082a 100644 (file)
@@ -12,6 +12,7 @@ SIM_OBJS = \
        sim-model.o \
        sim-reg.o \
        sim-signal.o \
+       @SIM_DV_SOCKSER_O@ \
         cgen-utils.o cgen-trace.o cgen-scache.o \
         cgen-run.o sim-reason.o sim-engine.o sim-stop.o \
         sim-if.o arch.o \
index 98f3a8cb6cc34e16b5e6af69bf64cd9202645374..ee4d6898ba24c5fb5a3f2e068bd6a004f59d214f 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-15  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.in [HAVE_DV_SOCKSER]: Delete.
+
 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (SIM_RUN_OBJS): Delete.
index 1d159bc5e1180a883e5ed1218b99887eaa3d551a..a5c55d5fa320ab74dc13992a72ff9ac83515a96b 100644 (file)
 /* For MSPR support.  FIXME: revisit.  */
 #define WITH_DEVICES 1
 
-/* FIXME: Revisit.  */
-#ifdef HAVE_DV_SOCKSER
-MODULE_INSTALL_FN dv_sockser_install;
-#define MODULE_LIST dv_sockser_install,
-#endif
-
 #if 0
 /* Enable watchpoints.  */
 #define WITH_WATCHPOINTS 1
index 72fbdd2fc603d65696ccf98869e10e1117b93740..2be47e0be2b9a9d4eed2a47afe9f10d8816648ed 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-15  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.in: Delete includes.
+       [HAVE_DV_SOCKSER]: Delete.
+
 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (SIM_RUN_OBJS): Delete.
index a68a5fb3a9d718ada00eb210cbf8513dd4d5e8e4..95e66b4dad5ac4b176b16a4ea1c2c5ea21e9d551 100644 (file)
@@ -3,19 +3,6 @@
 /* See sim-hload.c.  We properly handle LMA.  */
 #ifdef TARGET_TX3904
 #define SIM_HANDLES_LMA 1
-
-/* FIXME: This is unnecessarily necessary: */
-#include "ansidecl.h"
-#include "gdb/callback.h"
-#include "gdb/remote-sim.h"
-#include "sim-module.h"
-
-/* FIXME: Revisit.  */
-#ifdef HAVE_DV_SOCKSER
-MODULE_INSTALL_FN dv_sockser_install;
-#define MODULE_LIST dv_sockser_install,
-#endif
-
 #else
 #define SIM_HANDLES_LMA 0
 #endif
index b4d84aa7067643359cf003208579a053b98152de..aa9f5f1900b18cff16f5edc9caf618cf2a733b53 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-15  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.in: Delete file.
+
 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (SIM_RUN_OBJS): Delete.
diff --git a/sim/mn10300/tconfig.in b/sim/mn10300/tconfig.in
deleted file mode 100644 (file)
index 1d1237b..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* mn10300 target configuration file.  */
-
-/* FIXME: This is unnecessarily necessary: */
-#include "ansidecl.h"
-#include "gdb/callback.h"
-#include "gdb/remote-sim.h"
-#include "sim-module.h"
-
-/* FIXME: Revisit.  */
-#ifdef HAVE_DV_SOCKSER
-MODULE_INSTALL_FN dv_sockser_install;
-#define MODULE_LIST dv_sockser_install,
-#endif
-
-/* Define this if the simulator supports profiling.
-   See the mips simulator for an example.
-   This enables the `-p foo' and `-s bar' options.
-   The target is required to provide sim_set_profile{,_size}.  */
-/* #define SIM_HAVE_PROFILE */
-
-/* Define this if the simulator uses an instruction cache.
-   See the h8/300 simulator for an example.
-   This enables the `-c size' option to set the size of the cache.
-   The target is required to provide sim_set_simcache_size.  */
-/* #define SIM_HAVE_SIMCACHE */
-
-/* Define this if the target cpu is bi-endian
-   and the simulator supports it.  */
-/* #define SIM_HAVE_BIENDIAN */
index 43eee863c5ac8ea300ec52fc887d5b209146769c..20da758ccf98fc0795f4fd4dace940859f2b42ad 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-15  Mike Frysinger  <vapier@gentoo.org>
+
+       * tconfig.in [HAVE_DV_SOCKSER]: Delete.
+
 2015-03-14  Mike Frysinger  <vapier@gentoo.org>
 
        * Makefile.in (SIM_RUN_OBJS): Delete.
index bab3f1ce7edea1756dd7561b35d54d7d65be031b..9d64be9e703736c0f2923f6a624e6ec0820544da 100644 (file)
 /* For MSPR support.  FIXME: revisit.  */
 #define WITH_DEVICES 0
 
-/* FIXME: Revisit.  */
-#ifdef HAVE_DV_SOCKSER
-MODULE_INSTALL_FN dv_sockser_install;
-#define MODULE_LIST dv_sockser_install,
-#endif
-
 #if 0
 /* Enable watchpoints.  */
 #define WITH_WATCHPOINTS 1