#include <signal.h>
#include <sys/errno.h>
#include <termios.h>
-#include <strings.h>
+#include <string.h>
/* Non-zero means that we're doing the cadillac interface. */
int cadillac = 0;
\f
/* Examine a protocol packet from the driver. */
-static int
+static void
kernel_dispatch(queue)
int queue; /* Non-zero means we should just queue up
commands. */
char *tail;
int skipped;
- tail = rindex(req->newBreakpoint.fileName.text, '/');
+ tail = strrchr(req->newBreakpoint.fileName.text, '/');
if (!tail)
tail = req->newBreakpoint.fileName.text;
else
/* Tell the rest of the world that Cadillac is now set up. */
cadillac = 1;
+ setsid(); /* Drop controlling tty, become pgrp master */
getpty(); /* Setup the pty */
dup2(inferior_tty, 0); /* Attach all GDB I/O to the pty */
dup2(inferior_tty, 1);
}
static void
-iosig()
+iosig(signo)
+ int signo;
{
while (1)
{