diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-03-15 02:55:08 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-03-15 03:05:05 -0400 |
commit | 8406bb5944940a8830b37b97584dda3208a3d07d (patch) | |
tree | 9fed3d4c5c3ca932b0fc4955a965bf38ea3dd447 /sim/common | |
parent | b19839da382a4755e91d0a943b6d89d13fd74972 (diff) | |
download | gdb-8406bb5944940a8830b37b97584dda3208a3d07d.zip gdb-8406bb5944940a8830b37b97584dda3208a3d07d.tar.gz gdb-8406bb5944940a8830b37b97584dda3208a3d07d.tar.bz2 |
sim: dv-sockser: push module init prototype down
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.
Diffstat (limited to 'sim/common')
-rw-r--r-- | sim/common/ChangeLog | 8 | ||||
-rw-r--r-- | sim/common/dv-sockser.h | 2 | ||||
-rw-r--r-- | sim/common/sim-module.c | 10 | ||||
-rw-r--r-- | sim/common/sim-module.h | 1 |
4 files changed, 21 insertions, 0 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index cd51d62..08d3b93 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -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. diff --git a/sim/common/dv-sockser.h b/sim/common/dv-sockser.h index 8ad9981..cc4fd74 100644 --- a/sim/common/dv-sockser.h +++ b/sim/common/dv-sockser.h @@ -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 */ diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c index 2f7ac5f..fd9b587 100644 --- a/sim/common/sim-module.c +++ b/sim/common/sim-module.c @@ -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. */ @@ -60,6 +66,10 @@ static MODULE_INSTALL_FN * const modules[] = { #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 MODULE_LIST diff --git a/sim/common/sim-module.h b/sim/common/sim-module.h index 9979ec0..53b8306 100644 --- a/sim/common/sim-module.h +++ b/sim/common/sim-module.h @@ -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. */ |