#include "terminal.h"
#include "target.h"
#include "gdbthread.h"
-#include "observer.h"
+#include "observable.h"
#include <signal.h>
#include <fcntl.h>
#include "gdb_select.h"
to SIG_IGN. */
static sighandler_t sigint_ours;
+#ifdef SIGQUIT
static sighandler_t sigquit_ours;
+#endif
/* The name of the tty (from the `tty' command) that we're giving to
the inferior when starting it up. This is only (and should only
xfree (tinfo->ttystate);
tinfo->ttystate = serial_get_tty_state (stdin_serial);
+#ifdef HAVE_TERMIOS_H
tinfo->process_group = tcgetpgrp (0);
+#endif
#ifdef F_GETFL
tinfo->tflags = fcntl (0, F_GETFL, 0);
either Ctrl-C or with kill(3) with negative PID) sends a
SIGINT to each process in the process group, and we may not
be debugging all processes in the process group. */
+#ifndef _WIN32
kill (resumed->inf->pid, SIGINT);
+#endif
}
}
{
gdb_assert (inf->pid != 0);
+#ifndef _WIN32
kill (inf->pid, SIGINT);
+#endif
return;
}
}
return;
}
- if (ptid_equal (inferior_ptid, null_ptid))
+ if (inferior_ptid == null_ptid)
return;
inf = current_inferior ();
void
new_tty (void)
{
- int tty;
-
if (inferior_thisrun_terminal == 0)
return;
#if !defined(__GO32__) && !defined(_WIN32)
+ int tty;
+
#ifdef TIOCNOTTY
/* Disconnect the child process from our controlling terminal. On some
systems (SVR4 for example), this may cause a SIGTTOU, so temporarily
pass_signal (int signo)
{
#ifndef _WIN32
- kill (ptid_get_pid (inferior_ptid), SIGINT);
+ kill (inferior_ptid.pid (), SIGINT);
#endif
}
/* OK, figure out whether we have job control. */
have_job_control ();
- observer_attach_inferior_exit (inflow_inferior_exit);
+ gdb::observers::inferior_exit.attach (inflow_inferior_exit);
inflow_inferior_data
= register_inferior_data_with_cleanup (NULL, inflow_inferior_data_cleanup);