aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/monitor.h12
-rw-r--r--gdb/remote-mon.c167
3 files changed, 126 insertions, 59 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 95cedc8..70860eb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+Fri Oct 14 19:39:47 1994 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * monitor.h, remote-mon.c: Hack up to so the old ROM monitor
+ interface code still works with the new ROM monitor
+ structures. Fake out a couple of fields.
+
Fri Oct 14 14:54:37 1994 Stan Shebs (shebs@andros.cygnus.com)
* h8500-tdep.c (target_read_sp, target_write_sp, target_read_pc,
diff --git a/gdb/monitor.h b/gdb/monitor.h
index aaaa495..6e3758f 100644
--- a/gdb/monitor.h
+++ b/gdb/monitor.h
@@ -78,6 +78,8 @@ extern struct monitor_ops *current_monitor;
#define push_monitor(x) current_monitor = x;
+#define SREC_SIZE 160
+
extern void debuglogs();
extern void monitor_open();
extern void monitor_close();
@@ -96,3 +98,13 @@ extern void monitor_kill();
extern void monitor_load();
extern void monitor_create_inferior();
extern void monitor_mourn_inferior();
+
+/*
+ * FIXME: These are to temporarily maintain compatability with the
+ * old monitor structure till remote-mon.c is fixed to work
+ * like the *-rom.c files.
+ */
+#define MEM_PROMPT (current_monitor->loadtypes)
+#define MEM_SET_CMD (current_monitor->setmem)
+#define MEM_DIS_CMD (current_monitor->getmem)
+#define REG_DELIM (current_monitor->regset.delim)
diff --git a/gdb/remote-mon.c b/gdb/remote-mon.c
index 4552cca..a120ab8 100644
--- a/gdb/remote-mon.c
+++ b/gdb/remote-mon.c
@@ -62,7 +62,9 @@ extern struct target_ops rom68k_ops; /* Forward declaration */
extern struct target_ops mon68_ops; /* Forward declaration */
extern struct target_ops monitor_bug_ops; /* Forward declaration */
extern struct monitor_ops rom68k_cmds; /* Forward declaration */
+#if 0
extern struct monitor_ops mon68_cmds; /* Forward declaration */
+#endif
extern struct monitor_ops bug_cmds; /* Forward declaration */
extern struct cmd_list_element *setlist;
extern struct cmd_list_element *unsetlist;
@@ -385,7 +387,9 @@ mon68_open(args, from_tty)
int from_tty;
{
push_target(&mon68_ops);
+#if 0
push_monitor (&mon68_cmds);
+#endif
general_open (args, "mon68", from_tty);
}
@@ -944,6 +948,8 @@ connect_command (args, fromtty)
while (1)
{
do
+
+
{
FD_SET(0, &readfds);
FD_SET(monitor_desc, &readfds);
@@ -996,65 +1002,6 @@ connect_command (args, fromtty)
}
#endif
-/*
- * Define the monitor command strings. Since these are passed directly
- * through to a printf style function, we need can include formatting
- * strings. We also need a CR or LF on the end.
- */
-struct monitor_ops rom68k_cmds = {
- "go \r", /* execute or usually GO command */
- "go \r", /* continue command */
- "st \r", /* single step */
- "db %x\r", /* set a breakpoint */
- "cb %x\r", /* clear a breakpoint */
- "pm %x\r", /* set memory to a value */
- "pm %x\r", /* display memory */
- "-%08X ", /* prompt memory commands use */
- "pr %s %x\r", /* set a register */
- ": ", /* delimiter between registers */
- "pr %s\r", /* read a register */
- "dc \r", /* download command */
- "ROM68K :->", /* monitor command prompt */
- "=", /* end-of-command delimitor */
- ".\r" /* optional command terminator */
-};
-
-struct monitor_ops bug_cmds = {
- "go \r", /* execute or usually GO command */
- "go \r", /* continue command */
- "gn \r", /* single step */
- "br %x\r", /* set a breakpoint */
- "nobr %x\r", /* clear a breakpoint */
- "mm %x\r", /* set memory to a value */
- "mm %x\r", /* display memory */
- "%08X", /* prompt memory commands use */
- "rs %s %x\r", /* set a register */
- "=", /* delimiter between registers */
- "rm %s\r", /* read a register */
- "lo 0\r", /* download command */
- "Bug>", /* monitor command prompt */
- "? ", /* end-of-command delimitor */
- ".\r" /* optional command terminator */
-};
-
-/* Define the target subroutine names */
-struct monitor_ops mon68_cmds = {
- "", /* execute or usually GO command */
- "", /* continue command */
- "", /* single step */
- "", /* set a breakpoint */
- "", /* clear a breakpoint */
- "", /* set memory to a value */
- "", /* display memory */
- "", /* set a register */
- "", /* delimiter between registers */
- "", /* read a register */
- "", /* download command */
- ">", /* monitor command prompt */
- "", /* end-of-command delimitor */
- "" /* optional command terminator */
-};
-
struct target_ops rom68k_ops = {
"rom68k",
"Integrated System's ROM68K remote debug monitor",
@@ -1181,6 +1128,108 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
OPS_MAGIC, /* Always the last thing */
};
+
+/*
+ * Define the monitor command strings. Since these are passed directly
+ * through to a printf style function, we need can include formatting
+ * strings. We also need a CR or LF on the end.
+ */
+struct monitor_ops rom68k_cmds = {
+ 1, /* 1 is ascii, 0 is binary */
+ "\n", /* monitor init string */
+ "go \r", /* execute or usually GO command */
+ "go \r", /* continue command */
+ "st \r", /* single step */
+ "db %x\r", /* set a breakpoint */
+ "cb %x\r", /* clear a breakpoint */
+ 0, /* 0 for number, 1 for address */
+ {
+ "pm %x\r", /* set memory to a value */
+ "",
+ "",
+ },
+ {
+ "pm %x\r", /* display memory */
+ "",
+ "",
+ },
+ {
+ "pr %s %x\r", /* set a register */
+ ": ", /* delimiter between registers */
+ "",
+ },
+ {
+ "pr %s\r", /* read a register */
+ ": ", /* delimiter between registers */
+ "",
+ },
+ "dc \r", /* download command */
+ "ROM68K :->", /* monitor command prompt */
+ "=", /* end-of-command delimitor */
+ ".\r", /* optional command terminator */
+ &rom68k_ops, /* target operations */
+ "-%08X ", /* prompt memory commands use */
+};
+
+struct monitor_ops bug_cmds = {
+ 1, /* 1 is ascii, 0 is binary */
+ "\n", /* monitor init string */
+ "go \r", /* execute or usually GO command */
+ "go \r", /* continue command */
+ "gn \r", /* single step */
+ "br %x\r", /* set a breakpoint */
+ "nobr %x\r", /* clear a breakpoint */
+ 0, /* 0 for number, 1 for address */
+ {
+ "mm %x\r", /* set memory to a value */
+ "",
+ "",
+},
+ {
+ "mm %x\r", /* display memory */
+ "",
+ "",
+},
+ {
+ "rs %s %x\r", /* set a register */
+ "=", /* delimiter between registers */
+ "",
+},
+ {
+ "rm %s\r", /* read a register */
+ "=", /* delimiter between registers */
+ "",
+},
+ "lo 0\r", /* download command */
+ "Bug>", /* monitor command prompt */
+ "? ", /* end-of-command delimitor */
+ ".\r", /* optional command terminator */
+ &monitor_bug_ops,
+ "%08X", /* prompt memory commands use */
+};
+
+#if 0
+/* Define the target subroutine names */
+struct monitor_ops mon68_cmds = {
+ 1, /* 1 is ascii, 0 is binary */
+ "", /* execute or usually GO command */
+ "", /* continue command */
+ "", /* single step */
+ "", /* set a breakpoint */
+ "", /* clear a breakpoint */
+ "", /* set memory to a value */
+ "", /* display memory */
+ "", /* set a register */
+ "", /* delimiter between registers */
+ "", /* read a register */
+ "", /* download command */
+ ">", /* monitor command prompt */
+ "", /* end-of-command delimitor */
+ "" /* optional command terminator */
+ "" /* load types */
+};
+#endif
+
void
_initialize_remote_monitors ()
{