aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1996-04-01 00:44:19 +0000
committerStan Shebs <shebs@codesourcery.com>1996-04-01 00:44:19 +0000
commit32b186046eb4ea6f0190f179518f3aa1ddcd36d6 (patch)
treee5b8c91c66d947d615ecbb28c818d6459b10a362 /gdb
parent4be1b313251bda2b1d12031162de9698f3b9b518 (diff)
downloadgdb-32b186046eb4ea6f0190f179518f3aa1ddcd36d6.zip
gdb-32b186046eb4ea6f0190f179518f3aa1ddcd36d6.tar.gz
gdb-32b186046eb4ea6f0190f179518f3aa1ddcd36d6.tar.bz2
* mon960-rom.c: Cleanups and elimination of unused code,
clarify documentation string. (mon960_serial, mon960_ttyname): Remove. * config/i960/tm-mon960.h (ADDITIONAL_OPTIONS, ADDITIONAL_OPTION_CASES, ADDITIONAL_OPTION_HELP): Remove.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/config/i960/tm-mon960.h29
-rw-r--r--gdb/mon960-rom.c46
3 files changed, 25 insertions, 58 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c8e668e..12955d7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+Sun Mar 31 15:39:00 1996 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mon960-rom.c: Cleanups and elimination of unused code,
+ clarify documentation string.
+ (mon960_serial, mon960_ttyname): Remove.
+ * config/i960/tm-mon960.h (ADDITIONAL_OPTIONS,
+ ADDITIONAL_OPTION_CASES, ADDITIONAL_OPTION_HELP): Remove.
+
Sat Mar 30 11:00:22 1996 Fred Fish <fnf@cygnus.com>
* configure.in: Check whether printf family supports printing
diff --git a/gdb/config/i960/tm-mon960.h b/gdb/config/i960/tm-mon960.h
index eda15cd..3e7902a 100644
--- a/gdb/config/i960/tm-mon960.h
+++ b/gdb/config/i960/tm-mon960.h
@@ -40,46 +40,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* 32 */ "pc", "ac", "tc", "ip", "fp0", "fp1", "fp2", "fp3",\
}
-
/* Override the standard gdb prompt when compiled for this target. */
#define DEFAULT_PROMPT "(gdb960) "
-/* Additional command line options accepted by mon960 gdb's, for handling
- the remote-mon960.c interface. These should really be target-specific
- rather than architecture-specific. */
-
-/* FIXME - should use this instead of the "send_break" hack in monitor.c */
-extern int mon960_initial_brk; /* Send a BREAK to reset board first */
-extern char *mon960_ttyname; /* Name of serial port to talk to mon960 */
-
-#define ADDITIONAL_OPTIONS \
- /* FIXME {"brk", no_argument, &mon960_initial_brk, 1}, */ \
- {"ser", required_argument, 0, 1004}, /* 1004 is magic cookie for ADDL_CASES */
-
-#define ADDITIONAL_OPTION_CASES \
- case 1004: /* -ser option: remote mon960 auto-start */ \
- mon960_ttyname = optarg; \
- break;
-
-#define ADDITIONAL_OPTION_HELP \
- "\
- /* FIXME - -brk Send a break to a Mon960 target to reset it.\n*/\
- -ser SERIAL Open remote Mon960 session to SERIAL port.\n\
-"
-
/* FRAME_CHAIN_VALID returns zero if the given frame is the outermost one
and has no caller.
On the i960, each various target system type defines FRAME_CHAIN_VALID,
since it differs between Nindy, Mon960 and VxWorks, the currently supported
- targets types. */
+ target types. */
#define FRAME_CHAIN_VALID(chain, thisframe) \
mon960_frame_chain_valid (chain, thisframe)
-extern int
-mon960_frame_chain_valid(); /* See i960-tdep.c */
+extern int mon960_frame_chain_valid(); /* See i960-tdep.c */
/* Sequence of bytes for breakpoint instruction */
diff --git a/gdb/mon960-rom.c b/gdb/mon960-rom.c
index 5a79923..7fc5080 100644
--- a/gdb/mon960-rom.c
+++ b/gdb/mon960-rom.c
@@ -1,4 +1,4 @@
-/* Remote target glue for the Intel 960 ROM monitor.
+/* Remote target glue for the Intel 960 MON960 ROM monitor.
Copyright 1995, 1996 Free Software Foundation, Inc.
This file is part of GDB.
@@ -25,6 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "serial.h"
#include "srec.h"
#include "xmodem.h"
+#include "symtab.h"
+#include "symfile.h" /* for generic_load */
#if !defined (HAVE_TERMIOS) && !defined (HAVE_TERMIO) && !defined (HAVE_SGTTY)
#define HAVE_SGTTY
@@ -41,23 +43,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define USE_GENERIC_LOAD
-int quiet = 0; /* 1 => stifle unnecessary messages */
-serial_t mon960_serial;
-char *mon960_ttyname; /* name of tty to talk to mon960 on, or null */
+static struct target_ops mon960_ops;
+
static struct monitor_ops mon960_cmds;
-#ifdef USE_GENERIC_LOAD
-extern void generic_load PARAMS ((char* filename, int from_tty));
-#endif
static void mon960_open PARAMS ((char *args, int from_tty));
#ifdef USE_GENERIC_LOAD
+
static void
mon960_load_gen (filename, from_tty)
char *filename;
int from_tty;
{
extern int inferior_pid;
+
generic_load (filename, from_tty);
/* Finally, make the PC point at the start address */
if (exec_bfd)
@@ -67,6 +67,7 @@ mon960_load_gen (filename, from_tty)
}
#else
+
static void
mon960_load (desc, file, hashmark)
serial_t desc;
@@ -122,7 +123,8 @@ mon960_load (desc, file, hashmark)
if (hashmark)
putchar_unfiltered ('\n');
}
-#endif
+
+#endif /* USE_GENERIC_LOAD */
/* This array of registers need to match the indexes used by GDB.
This exists because the various ROM monitors use different strings
@@ -145,10 +147,9 @@ static char *mon960_regnames[NUM_REGS] = {
through to a printf style function, we may include formatting
strings. We also need a CR or LF on the end. */
-static struct target_ops mon960_ops;
-
/* need to pause the monitor for timing reasons, so slow it down */
-static char *mon960_inits[] = {"\n\r\r\r\r\r\r\r\r\r\r\r\r\r\r\n\r\n\r\n", NULL}; /* Exits sub-command mode & download cmds */
+
+static char *mon960_inits[] = {"\n\r\r\r\r\r\r\r\r\r\r\r\r\r\r\n\r\n\r\n", NULL};
static struct monitor_ops mon960_cmds =
{
@@ -221,38 +222,21 @@ static struct monitor_ops mon960_cmds =
MONITOR_OPS_MAGIC /* magic */
};
-/* invoked from monitor.c - opens the serial port */
static void
mon960_open (args, from_tty)
char *args;
int from_tty;
{
- char *serial_port_name = args;
- if (args)
- {
- char *cursor = serial_port_name = strsave (args);
-
- while (*cursor && *cursor != ' ')
- cursor++;
-
- if (*cursor)
- *cursor++ = 0;
-
- while (*cursor == ' ')
- cursor++;
-
- }
- monitor_open (serial_port_name, &mon960_cmds, from_tty);
+ monitor_open (args, &mon960_cmds, from_tty);
}
-
void
_initialize_mon960 ()
{
init_monitor_ops (&mon960_ops);
mon960_ops.to_shortname = "mon960"; /* for the target command */
- mon960_ops.to_longname = "Intel 960 rom monitor";
+ mon960_ops.to_longname = "Intel 960 MON960 monitor";
#ifdef USE_GENERIC_LOAD
mon960_ops.to_load = mon960_load_gen; /* FIXME - should go back and try "do" */
#endif
@@ -261,7 +245,7 @@ _initialize_mon960 ()
mon960_ops.to_remove_breakpoint = memory_remove_breakpoint;
mon960_ops.to_doc =
- "Debug on an Intel 960 eval board running the Mon960 rom monitor.\n"
+ "Use an Intel 960 board running the MON960 debug monitor.\n"
"Specify the serial device it is connected to (e.g. /dev/ttya).";
mon960_ops.to_open = mon960_open;