aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1995-07-01 00:22:57 +0000
committerStan Shebs <shebs@codesourcery.com>1995-07-01 00:22:57 +0000
commitfb506180fa5693ca174d88b433f61c9f2b71c040 (patch)
tree1ec8abd1c505c2a853e2b5dbc4e904c9ea783efa /gdb
parent8e968e86d44870dcbdf898c3f66e31b3f3541ea4 (diff)
downloadgdb-fb506180fa5693ca174d88b433f61c9f2b71c040.zip
gdb-fb506180fa5693ca174d88b433f61c9f2b71c040.tar.gz
gdb-fb506180fa5693ca174d88b433f61c9f2b71c040.tar.bz2
* config/h8300/h8300.mt: Renamed from h8300hms.mt.
* config/h8500/h8500.mt: Renamed from h8500hms.mt. * config/z8k/z8k.mt: Renamed from z8ksim.mt. * configure, configure.in: Update to reflect renamings. * remote-sim.c (sim): New command, passes commands to simulator. (simulator_command): New function. (gdbsim_ops): Clean up. * remote-sim.h (sim_do_command): Declare. * sh-tdep.c (memory_size): Remove command. * Makefile.in (SIM, SIM_OBS): New variables. (CLIBS, CDEPS): Add value of SIM. (DEPFILES): Add value of SIM_OBS * config/arm/arm.mt, config/h8300/h8300.mt, config/h8500/h8500.mt, config/sh/sh.mt, config/sparc/sp64sim.mt, config/w65/w65.mt, config/z8k/z8k.mt: Remove simulator files from TDEPFILES, define in SIM_OBS and SIM. config/sparc/sp64sim.mt (SIMFILES): Remove. * remote-z8k.c: Remove, was superseded by remote-sim.c * Makefile.in, mpw-make.in: Remove references to remote-z8k.c.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog26
-rw-r--r--gdb/config/arm/arm.mt7
-rw-r--r--gdb/config/h8300/h8300.mt6
-rw-r--r--gdb/config/h8300/h8300hms.mt3
-rw-r--r--gdb/config/h8500/h8500.mt6
-rw-r--r--gdb/config/h8500/h8500hms.mt3
-rw-r--r--gdb/config/sh/sh.mt9
-rw-r--r--gdb/config/sparc/sp64sim.mt5
-rwxr-xr-xgdb/config/w65/w65.mt13
-rw-r--r--gdb/config/z8k/z8k.mt7
-rw-r--r--gdb/config/z8k/z8ksim.mt3
-rwxr-xr-xgdb/configure8
-rw-r--r--gdb/configure.in8
-rw-r--r--gdb/mpw-make.in5
-rw-r--r--gdb/remote-sim.c80
-rw-r--r--gdb/remote-sim.h4
-rw-r--r--gdb/remote-z8k.c362
-rw-r--r--gdb/sh-tdep.c10
18 files changed, 131 insertions, 434 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6687541..1e096fb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,29 @@
+Fri Jun 30 16:15:36 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * config/h8300/h8300.mt: Renamed from h8300hms.mt.
+ * config/h8500/h8500.mt: Renamed from h8500hms.mt.
+ * config/z8k/z8k.mt: Renamed from z8ksim.mt.
+ * configure, configure.in: Update to reflect renamings.
+
+ * remote-sim.c (sim): New command, passes commands to simulator.
+ (simulator_command): New function.
+ (gdbsim_ops): Clean up.
+ * remote-sim.h (sim_do_command): Declare.
+ * sh-tdep.c (memory_size): Remove command.
+
+ * Makefile.in (SIM, SIM_OBS): New variables.
+ (CLIBS, CDEPS): Add value of SIM.
+ (DEPFILES): Add value of SIM_OBS
+
+ * config/arm/arm.mt, config/h8300/h8300.mt, config/h8500/h8500.mt,
+ config/sh/sh.mt, config/sparc/sp64sim.mt, config/w65/w65.mt,
+ config/z8k/z8k.mt: Remove simulator files from TDEPFILES,
+ define in SIM_OBS and SIM.
+ config/sparc/sp64sim.mt (SIMFILES): Remove.
+
+ * remote-z8k.c: Remove, was superseded by remote-sim.c
+ * Makefile.in, mpw-make.in: Remove references to remote-z8k.c.
+
Sun Jun 25 15:30:43 1995 Stan Shebs <shebs@cygnus.com>
* remote.c (remote_read_bytes, remote_write_bytes): Second arg
diff --git a/gdb/config/arm/arm.mt b/gdb/config/arm/arm.mt
index b0e4dbe..fd951ea 100644
--- a/gdb/config/arm/arm.mt
+++ b/gdb/config/arm/arm.mt
@@ -1,3 +1,6 @@
-# Target: Acorn RISC machine running RISCiX (4.3bsd)
-TDEPFILES= arm-tdep.o remote-sim.o ../sim/arm/libsim.a
+# Target: Acorn RISC machine (ARM) with simulator
+TDEPFILES= arm-tdep.o
TM_FILE= tm-arm.h
+
+SIM_OBS = remote-sim.o
+SIM = ../sim/arm/libsim.a
diff --git a/gdb/config/h8300/h8300.mt b/gdb/config/h8300/h8300.mt
new file mode 100644
index 0000000..80386f3
--- /dev/null
+++ b/gdb/config/h8300/h8300.mt
@@ -0,0 +1,6 @@
+# Target: H8300 with HMS monitor, E7000 ICE and H8 simulator
+TDEPFILES= h8300-tdep.o remote-e7000.o ser-e7kpc.o monitor.o remote-hms.o
+TM_FILE= tm-h8300.h
+
+SIM_OBS = remote-sim.o
+SIM = ../sim/h8300/compile.o
diff --git a/gdb/config/h8300/h8300hms.mt b/gdb/config/h8300/h8300hms.mt
deleted file mode 100644
index 7e1b19e..0000000
--- a/gdb/config/h8300/h8300hms.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: H8300 with HMS monitor, E7000 ICE and H8 simulator
-TDEPFILES= h8300-tdep.o ser-e7kpc.o remote-e7000.o monitor.o remote-hms.o remote-sim.o ../sim/h8300/compile.o
-TM_FILE= tm-h8300.h
diff --git a/gdb/config/h8500/h8500.mt b/gdb/config/h8500/h8500.mt
new file mode 100644
index 0000000..e8c6f5c
--- /dev/null
+++ b/gdb/config/h8500/h8500.mt
@@ -0,0 +1,6 @@
+# Target: H8500 with HMS monitor and H8 simulator
+TDEPFILES= h8500-tdep.o remote-hms.o
+TM_FILE= tm-h8500.h
+
+SIM_OBS = remote-sim.o
+SIM = ../sim/h8500/compile.o
diff --git a/gdb/config/h8500/h8500hms.mt b/gdb/config/h8500/h8500hms.mt
deleted file mode 100644
index 68154cb..0000000
--- a/gdb/config/h8500/h8500hms.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: H8500 with HMS monitor and H8 simulator
-TDEPFILES= h8500-tdep.o remote-hms.o remote-sim.o ../sim/h8500/compile.o
-TM_FILE= tm-h8500.h
diff --git a/gdb/config/sh/sh.mt b/gdb/config/sh/sh.mt
index 0581244..c1a0f7c 100644
--- a/gdb/config/sh/sh.mt
+++ b/gdb/config/sh/sh.mt
@@ -1,5 +1,6 @@
-# Target: Hitachi Super-H ICE and simulator
-TDEPFILES= sh-tdep.o remote-sim.o ../sim/sh/libsim.a remote-e7000.o ser-e7kpc.o
-over: all
-
+# Target: Hitachi Super-H with ICE and simulator
+TDEPFILES= sh-tdep.o remote-e7000.o ser-e7kpc.o
TM_FILE= tm-sh.h
+
+SIM_OBS = remote-sim.o
+SIM = ../sim/sh/libsim.a
diff --git a/gdb/config/sparc/sp64sim.mt b/gdb/config/sparc/sp64sim.mt
index b748180..6613284 100644
--- a/gdb/config/sparc/sp64sim.mt
+++ b/gdb/config/sparc/sp64sim.mt
@@ -2,14 +2,15 @@
# solib.o and procfs.o taken out for now. We don't have shared libraries yet,
# and the elf version requires procfs.o but the a.out version doesn't.
# Then again, having procfs.o in a target makefile fragment seems wrong.
-TDEPFILES = sparc-tdep.o $(SIMFILES)
+TDEPFILES = sparc-tdep.o
TM_FILE= tm-sp64.h
# Need gcc for long long support.
CC = gcc
MH_CFLAGS = -I${srcdir}/../sim/sp64
-SIMFILES = remote-sim.o ../sim/sp64/libsim.a
+SIM_OBS = remote-sim.o
+SIM = ../sim/sp64/libsim.a
# The simulator uses the sqrt() function.
TM_CLIBS = -lm
diff --git a/gdb/config/w65/w65.mt b/gdb/config/w65/w65.mt
index 0d61dcc..06d2325 100755
--- a/gdb/config/w65/w65.mt
+++ b/gdb/config/w65/w65.mt
@@ -1,11 +1,8 @@
-# Target: WDC 65816 simulator
-TDEPFILES= w65-tdep.o remote-sim.o libsim.a
-
-other:all
+# Target: WDC 65816 with simulator
+TDEPFILES= w65-tdep.o
+TM_FILE= tm-w65.h
-libsim.a:
- cp ../sim/w65/libsim.a .
- ranlib libsim.a
+SIM_OBS = remote-sim.o
+SIM = ../sim/w65/libsim.a
-TM_FILE= tm-w65.h
diff --git a/gdb/config/z8k/z8k.mt b/gdb/config/z8k/z8k.mt
new file mode 100644
index 0000000..cb8d043
--- /dev/null
+++ b/gdb/config/z8k/z8k.mt
@@ -0,0 +1,7 @@
+# Target: Z8000 with simulator
+TDEPFILES= z8k-tdep.o
+TM_FILE= tm-z8k.h
+
+SIM_OBS = remote-sim.o
+SIM = ../sim/z8k/libsim.a
+
diff --git a/gdb/config/z8k/z8ksim.mt b/gdb/config/z8k/z8ksim.mt
deleted file mode 100644
index 744470c..0000000
--- a/gdb/config/z8k/z8ksim.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# Target: Z8000 simulator
-TDEPFILES= z8k-tdep.o remote-sim.o ../sim/z8k/libsim.a
-TM_FILE= tm-z8k.h
diff --git a/gdb/configure b/gdb/configure
index 9c175a0..ca5ef18 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -1699,8 +1699,8 @@ arm-*-*) gdb_target=arm ;;
c1-*-*) gdb_target=convex ;;
c2-*-*) gdb_target=convex ;;
-h8300-*-*) gdb_target=h8300hms ;;
-h8500-*-*) gdb_target=h8500hms ;;
+h8300-*-*) gdb_target=h8300 ;;
+h8500-*-*) gdb_target=h8500 ;;
sh-*-*) gdb_target=sh ;;
@@ -1851,8 +1851,8 @@ vax-*-*) gdb_target=vax ;;
w65-*-*) gdb_target=w65 ;;
-z8k-*-sim*) gdb_target=z8ksim ;;
-z8k-*-coff*) gdb_target=z8ksim ;;
+z8k-*-sim*) gdb_target=z8k ;;
+z8k-*-coff*) gdb_target=z8k ;;
esac
diff --git a/gdb/configure.in b/gdb/configure.in
index 29c7621..5a0b19b 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -251,8 +251,8 @@ arm-*-*) gdb_target=arm ;;
c1-*-*) gdb_target=convex ;;
c2-*-*) gdb_target=convex ;;
-h8300-*-*) gdb_target=h8300hms ;;
-h8500-*-*) gdb_target=h8500hms ;;
+h8300-*-*) gdb_target=h8300 ;;
+h8500-*-*) gdb_target=h8500 ;;
sh-*-*) gdb_target=sh ;;
@@ -403,8 +403,8 @@ vax-*-*) gdb_target=vax ;;
w65-*-*) gdb_target=w65 ;;
-z8k-*-sim*) gdb_target=z8ksim ;;
-z8k-*-coff*) gdb_target=z8ksim ;;
+z8k-*-sim*) gdb_target=z8k ;;
+z8k-*-coff*) gdb_target=z8k ;;
esac
diff --git a/gdb/mpw-make.in b/gdb/mpw-make.in
index 9e58f99..8d28644 100644
--- a/gdb/mpw-make.in
+++ b/gdb/mpw-make.in
@@ -349,7 +349,7 @@ ALLDEPFILES = "{s}"29k-share:udi:udip2soc.c "{s}"29k-share:udi:udr.c \Option-d
"{s}"remote-hms.c "{s}"remote-mips.c \Option-d
"{s}"remote-mm.c "{s}"remote-mon.c "{s}"remote-nindy.c "{s}"remote-sim.c \Option-d
"{s}"remote-st.c "{s}"remote-utils.c "{s}"dcache.c \Option-d
- "{s}"remote-udi.c "{s}"remote-vx.c "{s}"remote-z8k.c "{s}"rs6000-nat.c \Option-d
+ "{s}"remote-udi.c "{s}"remote-vx.c "{s}"rs6000-nat.c \Option-d
"{s}"rs6000-tdep.c "{s}"ser-go32.c "{s}"ser-tcp.c "{s}"sh-tdep.c "{s}"solib.c "{s}"sparc-nat.c \Option-d
"{s}"sparc-tdep.c "{s}"sun3-nat.c "{s}"sun386-nat.c \Option-d
"{s}"symm-tdep.c "{s}"symm-nat.c \Option-d
@@ -1461,9 +1461,6 @@ MAKEOVERRIDES=
"{s}"vx-share:ptrace.h "{s}"vx-share:xdr_ld.h "{s}"vx-share:xdr_ptrace.h \Option-d
"{s}"vx-share:xdr_rdb.h
-"{o}"remote-z8k.c.o \Option-f "{s}"remote-z8k.c {wait_h} "{s}":sim:z8k:sim.h \Option-d
- {defs_h} {gdbcore_h} {inferior_h} "{s}"target.h "{s}"terminal.h
-
"{o}"remote-utils.c.o \Option-f "{s}"remote-utils.c {defs_h} {gdbcmd_h} {gdbcore_h} \Option-d
{inferior_h} {remote_utils_h}
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 48de081..637adae 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -385,7 +385,7 @@ gdbsim_files_info (target)
}
}
-/* Clear the sims notion of what the break points are. */
+/* Clear the simulator's notion of what the break points are. */
static void
gdbsim_mourn_inferior ()
@@ -397,37 +397,67 @@ gdbsim_mourn_inferior ()
generic_mourn_inferior ();
}
-/* Define the target subroutine names */
+/* Put a command string, in args, out to MONITOR. Output from MONITOR
+ is placed on the users terminal until the prompt is seen. FIXME: We
+ read the characters ourseleves here cause of a nasty echo. */
-struct target_ops gdbsim_ops =
+static void
+simulator_command (args, from_tty)
+ char *args;
+ int from_tty;
{
- "sim", "simulator",
- "Use the simulator",
- gdbsim_open, gdbsim_close,
- 0, gdbsim_detach, gdbsim_resume, gdbsim_wait, /* attach */
- gdbsim_fetch_register, gdbsim_store_register,
- gdbsim_prepare_to_store,
- gdbsim_xfer_inferior_memory,
- gdbsim_files_info,
- memory_insert_breakpoint,
- memory_remove_breakpoint,
- 0, 0, 0, 0, 0, /* Terminal handling */
- gdbsim_kill, /* kill */
- gdbsim_load, /* load */
- 0, /* lookup_symbol */
- gdbsim_create_inferior, /* create_inferior */
- gdbsim_mourn_inferior, /* mourn_inferior */
- 0, /* can_run */
- 0, /* notice_signals */
+ sim_do_command (args);
+}
+
+/* Define the target subroutine names */
+
+struct target_ops gdbsim_ops = {
+ "sim", /* to_shortname */
+ "simulator", /* to_longname */
+ "Use the compiled-in simulator.", /* to_doc */
+ gdbsim_open, /* to_open */
+ gdbsim_close, /* to_close */
+ NULL, /* to_attach */
+ gdbsim_detach, /* to_detach */
+ gdbsim_resume, /* to_resume */
+ gdbsim_wait, /* to_wait */
+ gdbsim_fetch_register, /* to_fetch_registers */
+ gdbsim_store_register, /* to_store_registers */
+ gdbsim_prepare_to_store, /* to_prepare_to_store */
+ gdbsim_xfer_inferior_memory, /* to_xfer_memory */
+ gdbsim_files_info, /* to_files_info */
+ memory_insert_breakpoint, /* to_insert_breakpoint */
+ memory_remove_breakpoint, /* to_remove_breakpoint */
+ NULL, /* to_terminal_init */
+ NULL, /* to_terminal_inferior */
+ NULL, /* to_terminal_ours_for_output */
+ NULL, /* to_terminal_ours */
+ NULL, /* to_terminal_info */
+ gdbsim_kill, /* to_kill */
+ gdbsim_load, /* to_load */
+ NULL, /* to_lookup_symbol */
+ gdbsim_create_inferior, /* to_create_inferior */
+ gdbsim_mourn_inferior, /* to_mourn_inferior */
+ 0, /* to_can_run */
+ 0, /* to_notice_signals */
0, /* to_stop */
- process_stratum, 0, /* next */
- 1, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */
- 0, 0, /* Section pointers */
- OPS_MAGIC, /* Always the last thing */
+ process_stratum, /* to_stratum */
+ NULL, /* to_next */
+ 1, /* to_has_all_memory */
+ 1, /* to_has_memory */
+ 1, /* to_has_stack */
+ 1, /* to_has_registers */
+ 1, /* to_has_execution */
+ NULL, /* sections */
+ NULL, /* sections_end */
+ OPS_MAGIC, /* to_magic */
};
void
_initialize_remote_sim ()
{
add_target (&gdbsim_ops);
+
+ add_com ("sim <command>", class_obscure, simulator_command,
+ "Send a command to the simulator.");
}
diff --git a/gdb/remote-sim.h b/gdb/remote-sim.h
index 9f31536..4076794 100644
--- a/gdb/remote-sim.h
+++ b/gdb/remote-sim.h
@@ -119,4 +119,8 @@ void sim_stop_reason PARAMS ((enum sim_stop *reason, int *sigrc));
void sim_resume PARAMS ((int step, int siggnal));
+/* Passthru for other commands that the simulator might support. */
+
+void sim_do_command PARAMS ((char *cmd));
+
#endif /* !defined (REMOTE_SIM_H) */
diff --git a/gdb/remote-z8k.c b/gdb/remote-z8k.c
index df01e54..e69de29 100644
--- a/gdb/remote-z8k.c
+++ b/gdb/remote-z8k.c
@@ -1,362 +0,0 @@
-/* Remote debugging interface for Zilog Z8000 simulator
- Copyright 1992,1993 Free Software Foundation, Inc.
- Contributed by Cygnus Support. Written by Steve Chamberlain
- (sac@cygnus.com).
-
-This file is part of GDB.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-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, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-#include "defs.h"
-#include "inferior.h"
-#include "wait.h"
-#include "value.h"
-#include <string.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <setjmp.h>
-#include <errno.h>
-#include "terminal.h"
-#include "target.h"
-#include "gdbcore.h"
-#include "../sim/z8k/sim.h"
-
-/* External data declarations */
-extern int stop_soon_quietly; /* for wait_for_inferior */
-
-/* Forward data declarations */
-/*extern struct target_ops sim_ops; /* Forward declaration */
-
-void sim_store_register ();
-void sim_set_oc ();
-
-int inferior_pid;
-int
-sim_write_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- unsigned char *myaddr;
- int len;
-{
- sim_write (memaddr, myaddr, len);
- return 1;
-}
-
-static void
-store_register (regno)
- int regno;
-{
- if (regno == -1)
- {
- for (regno = 0; regno < 16; regno++)
- {
- store_register (regno);
- }
- }
- else
- {
- sim_store_register (regno, read_register (regno));
- }
-}
-
-void
-sim_kill (arg, from_tty)
- char *arg;
- int from_tty;
-{
-}
-
-/*
- * Download a file specified in 'args', to the sim.
- */
-static void
-sasassim_load (args, fromtty)
- char *args;
- int fromtty;
-{
- bfd *abfd;
- asection *s;
-
- inferior_pid = 0;
- abfd = bfd_openr (args, "coff-z8k");
-
- if (!abfd)
- {
- printf_filtered ("Unable to open file %s\n", args);
- return;
- }
-
- if (bfd_check_format (abfd, bfd_object) == 0)
- {
- printf_filtered ("File is not an object file\n");
- return;
- }
-
- s = abfd->sections;
- while (s != (asection *) NULL)
- {
- if (s->flags & SEC_LOAD)
- {
- int i;
- int delta = 4096;
- char *buffer = xmalloc (delta);
-
- printf_filtered ("%s\t: 0x%4x .. 0x%4x ",
- s->name, s->vma, s->vma + s->_raw_size);
- for (i = 0; i < s->_raw_size; i += delta)
- {
- int sub_delta = delta;
-
- if (sub_delta > s->_raw_size - i)
- sub_delta = s->_raw_size - i;
-
- bfd_get_section_contents (abfd, s, buffer, i, sub_delta);
- sim_write_inferior_memory (s->vma + i, buffer, sub_delta);
- printf_filtered ("*");
- gdb_flush (gdb_stdout);
- }
- printf_filtered ("\n");
- free (buffer);
- }
- s = s->next;
- }
-
- sim_set_pc (abfd->start_address);
-}
-
-/* This is called not only when we first attach, but also when the
- user types "run" after having attached. */
-static void
-sim_create_inferior (execfile, args, env)
- char *execfile;
- char *args;
- char **env;
-{
- int entry_pt;
-
- if (args && *args)
- error ("Can't pass arguments to remote sim process.");
-
- if (execfile == 0 || exec_bfd == 0)
- error ("No exec file specified");
-
- entry_pt = (int) bfd_get_start_address (exec_bfd);
-
- sim_kill (NULL, NULL);
- sim_clear_breakpoints ();
- init_wait_for_inferior ();
- insert_breakpoints ();
- proceed (entry_pt, TARGET_SIGNAL_DEFAULT, 0);
-}
-#if 0
-static void
-sim_open (name, from_tty)
- char *name;
- int from_tty;
-{
- if (name == 0)
- {
- name = "";
- }
-
- /* Clear any break points */
- sim_clear_breakpoints ();
-
- push_target (&sim_ops);
- target_fetch_registers (-1);
-
- printf_filtered ("Connected to the Z8000 Simulator.\n");
-}
-
-/* Close out all files and local state before this target loses control. */
-
-static void
-sim_close (quitting)
- int quitting;
-{
- sim_clear_breakpoints ();
-}
-
-/* Terminate the open connection to the remote debugger.
- Use this when you want to detach and do something else
- with your gdb. */
-static void
-sim_detach (args, from_tty)
- char *args;
- int from_tty;
-{
- sim_clear_breakpoints ();
-
- pop_target (); /* calls sim_close to do the real work */
- if (from_tty)
- printf_filtered ("Ending remote %s debugging\n", target_shortname);
-}
-#endif
-/* Tell the remote machine to resume. */
-
-/* Wait until the remote machine stops, then return,
- storing status in STATUS just as `wait' would. */
-#if 0
-/* See remote-sim.c for how this is done now. */
-int
-sim_wait (pid, status)
- int pid;
- WAITTYPE *status;
-{
- sim_stop_reason (&reason, &sigrc);
- return inferior_pid;
-}
-#endif
-/* Get ready to modify the registers array. On machines which store
- individual registers, this doesn't need to do anything. On machines
- which store all the registers in one fell swoop, this makes sure
- that registers contains all the registers from the program being
- debugged. */
-
-static void
-sim_prepare_to_store ()
-{
- /* Do nothing, since we can store individual regs */
-}
-
-static void
-fetch_register (regno)
- int regno;
-{
- if (regno == -1)
- {
- for (regno = 0; regno < 16; regno++)
- fetch_register (regno);
- }
- else
- {
- char buf[MAX_REGISTER_RAW_SIZE];
-
- sim_fetch_register (regno, buf);
- supply_register (regno, buf);
- }
-}
-
-/* Write a word WORD into remote address ADDR.
- This goes through the data cache. */
-
-void
-sim_store_word (addr, word)
- CORE_ADDR addr;
- int word;
-{
-/* dcache_poke (addr, word);*/
-}
-
-int
-sim_xfer_inferior_memory (memaddr, myaddr, len, write, target)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
- int write;
- struct target_ops *target; /* ignored */
-{
- if (write)
- {
- sim_write (memaddr, myaddr, len);
-
- }
- else
- {
- sim_read (memaddr, myaddr, len);
- }
- return len;
-}
-
-void
-sim_files_info ()
-{
- char *file = "nothing";
-
- if (exec_bfd)
- file = bfd_get_filename (exec_bfd);
-
- printf_filtered ("\tAttached to %s running on the z8k simulator\n", file);
-}
-
-/* This routine is run as a hook, just before the main command loop is
- entered. If gdb is configured for the H8, but has not had its
- target specified yet, this will loop prompting the user to do so.
-*/
-
-#if 0
-void
-sim_before_main_loop ()
-{
- push_target (&sim_ops);
-}
-
-
-/* Clear the sims notion of what the break points are */
-static void
-sim_mourn ()
-{
- sim_clear_breakpoints ();
- unpush_target (&sim_ops);
- generic_mourn_inferior ();
-}
-#endif
-static void
-rem_resume (pid, a, b)
- int pid;
- int a;
- enum target_signal siggnal;
-{
- sim_resume (a, target_signal_to_host (siggnal));
-}
-
-
-/* Define the target subroutine names */
-#if 0
-struct target_ops sim_ops =
-{
- "sim", "Remote SIM monitor",
- "Use the Z8000 simulator",
- sim_open, sim_close,
- 0, sim_detach, rem_resume, sim_wait, /* attach */
- fetch_register, store_register,
- sim_prepare_to_store,
- sim_xfer_inferior_memory,
- sim_files_info,
- memory_insert_breakpoint,
- memory_remove_breakpoint,
- 0, 0, 0, 0, 0, /* Terminal handling */
- sim_kill, /* FIXME, kill */
- sim_load,
- 0, /* lookup_symbol */
- sim_create_inferior, /* create_inferior */
- sim_mourn, /* mourn_inferior FIXME */
- 0, /* can_run */
- 0, /* notice_signals */
- 0, /* to_stop */
- process_stratum, 0, /* next */
- 1, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */
- 0, 0, /* Section pointers */
- OPS_MAGIC, /* Always the last thing */
-};
-
-/***********************************************************************/
-
-void
-_initialize_remote_sim ()
-{
- add_target (&sim_ops);
-}
-#endif
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 5be266c..e09a6dd 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -307,20 +307,10 @@ show_regs (args, from_tty)
read_register (15));
}
-
void
_initialize_sh_tdep ()
{
- extern int sim_memory_size;
-
tm_print_insn = gdb_print_insn_sh;
- /* FIXME, there should be a way to make a CORE_ADDR variable settable. */
- add_show_from_set
- (add_set_cmd ("memory_size", class_support, var_uinteger,
- (char *) &sim_memory_size,
- "Set simulated memory size of simulator target.", &setlist),
- &showlist);
-
add_com ("regs", class_vars, show_regs, "Print all registers");
}