+Tue Jun 20 12:03:36 1995 Stan Shebs <shebs@andros.cygnus.com>
+
+ * monitor.c (monitor_wait): Don't use the watchdog timeout
+ if its value is 0.
+ * w89k-rom.c (w89k_open): Define to be static.
+
+start-sanitize-gdbtk
Tue Jun 20 10:19:40 1995 Stu Grossman (grossman@cygnus.com)
* gdbtk.c: Add functions Tcl_Malloc, Tcl_Realloc, and Tcl_Free.
* (build_framework): Turn on breakpoint menu.
* (create_command_window): Implement tab completion. Add binding
for ^C to stop target.
+end-sanitize-gdbtk
Sat Jun 17 10:17:16 1995 Jeff Law (law@snake.cs.utah.edu)
#include "gdbcore.h"
#include "target.h"
#include "wait.h"
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
#else
#include <varargs.h>
static int timeout = 30;
+static int in_monitor_wait = 0; /* Non-zero means we are in monitor_wait() */
+
static void (*ofunc)(); /* Old SIGINT signal handler */
/* Descriptor for I/O to remote machine. Initialize it to NULL so
Works just like printf. */
void
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
monitor_printf_noecho (char *pattern, ...)
#else
monitor_printf_noecho (va_alist)
char sndbuf[2000];
int len;
-#if __STDC__
+#if ANSI_PROTOTYPES
va_start (args, pattern);
#else
char *pattern;
printf. */
void
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
monitor_printf (char *pattern, ...)
#else
monitor_printf (va_alist)
int len;
int i, c;
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
va_start (args, pattern);
#else
char *pattern;
return c & 0x7f;
if (c == SERIAL_TIMEOUT)
- error ("Timeout reading from remote system.");
+#ifdef MAINTENANCE_CMDS
+ if (in_monitor_wait) /* Watchdog went off */
+ {
+ target_mourn_inferior ();
+ error ("Watchdog has expired. Target detached.\n");
+ }
+ else
+#endif
+ error ("Timeout reading from remote system.");
perror_with_name ("remote-monitor");
}
{
timeout = old_timeout;
signal (SIGINT, ofunc);
+ in_monitor_wait = 0;
}
/* Wait until the remote machine stops, then return, storing status in
old_chain = make_cleanup (monitor_wait_cleanup, old_timeout);
+#ifdef MAINTENANCE_CMDS
+ in_monitor_wait = 1;
+ timeout = watchdog > 0 ? watchdog : -1;
+#else
timeout = -1; /* Don't time out -- user program is running. */
+#endif
ofunc = (void (*)()) signal (SIGINT, monitor_interrupt);
discard_cleanups (old_chain);
+ in_monitor_wait = 0;
+
return inferior_pid;
}