aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-monitor.c
diff options
context:
space:
mode:
authorK. Richard Pixley <rich@cygnus>1993-08-02 23:54:27 +0000
committerK. Richard Pixley <rich@cygnus>1993-08-02 23:54:27 +0000
commit5905161c085c24499c9d87986777c894c8777d66 (patch)
tree8ae2710ef88692e5cc08c0c6c4f31c8807588675 /gdb/remote-monitor.c
parentb5ed6e32c291b0acee4a13dec390f2d1b8e6c76a (diff)
downloadgdb-5905161c085c24499c9d87986777c894c8777d66.zip
gdb-5905161c085c24499c9d87986777c894c8777d66.tar.gz
gdb-5905161c085c24499c9d87986777c894c8777d66.tar.bz2
* remote-monitor.c: updated copyright.
(bug_ops, monitor_desc): now static. (monitor_desc): in several places, check and/or set to NULL. * remote-hms.c (hms_files_info): Add the appropriate items where missing in the printf call. * remote-bug.c: new file for m88k bug support. * config/m88k/m88k.mt (TDEPFILES): added remote-bug.o.
Diffstat (limited to 'gdb/remote-monitor.c')
-rw-r--r--gdb/remote-monitor.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/gdb/remote-monitor.c b/gdb/remote-monitor.c
index eb3d63c..d6e4f54 100644
--- a/gdb/remote-monitor.c
+++ b/gdb/remote-monitor.c
@@ -1,5 +1,5 @@
/* Remote debugging interface for MONITOR boot monitor, for GDB.
- Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Rob Savoye for Cygnus.
This file is part of GDB.
@@ -59,7 +59,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
struct monitor_ops *current_monitor;
extern struct target_ops rom68k_ops; /* Forward declaration */
extern struct target_ops mon68_ops; /* Forward declaration */
-extern struct target_ops bug_ops; /* Forward declaration */
+static struct target_ops bug_ops; /* Forward declaration */
extern struct monitor_ops rom68k_cmds; /* Forward declaration */
extern struct monitor_ops mon68_cmds; /* Forward declaration */
extern struct monitor_ops bug_cmds; /* Forward declaration */
@@ -80,10 +80,10 @@ FILE *log_file;
static int timeout = 24;
-/* Descriptor for I/O to remote machine. Initialize it to -1 so that
- monitor_open knows that we don't have a file open when the program
- starts. */
-static serial_t monitor_desc;
+/* Descriptor for I/O to remote machine. Initialize it to NULL so that
+ monitor_open knows that we don't have a file open when the program starts.
+ */
+static serial_t monitor_desc = NULL;
/* Send data to monitor. Works just like printf. */
@@ -333,7 +333,7 @@ general_open(args, name, from_tty)
monitor_desc = SERIAL_OPEN(dev_name);
- if (!monitor_desc)
+ if (monitor_desc == NULL)
perror_with_name(dev_name);
/* The baud rate was specified when GDB was started. */
@@ -409,6 +409,7 @@ monitor_close (quitting)
int quitting;
{
SERIAL_CLOSE(monitor_desc);
+ monitor_desc = NULL;
#if defined (LOG_FILE)
if (log_file) {
@@ -886,7 +887,7 @@ monitor_command (args, fromtty)
#ifdef LOG_FILE
fprintf (log_file, "\nIn command (args=%s)\n", args);
#endif
- if (monitor_desc < 0)
+ if (monitor_desc == NULL)
error("monitor target not open.");
if (!args)
@@ -921,7 +922,7 @@ connect_command (args, fromtty)
dont_repeat();
- if (monitor_desc < 0)
+ if (monitor_desc == NULL)
error("monitor target not open.");
if (args)
@@ -1091,7 +1092,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
OPS_MAGIC, /* Always the last thing */
};
-struct target_ops bug_ops = {
+static struct target_ops bug_ops = {
"bug",
"Motorola's BUG remote serial debug monitor",
"Use a remote computer running Motorola's BUG debug monitor.\n\