Get rid of -Wodr warning (PR build/23399)
[deliverable/binutils-gdb.git] / gdb / inflow.c
index 7c5e90470309093d14d83c8f36d37eeafb9d6586..caff646207098c9938b43ccb671a39343c5ae910 100644 (file)
@@ -24,7 +24,7 @@
 #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"
@@ -138,7 +138,9 @@ private:
    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
@@ -469,7 +471,9 @@ child_terminal_save_inferior (struct target_ops *self)
   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);
@@ -563,7 +567,9 @@ child_interrupt (struct target_ops *self)
         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
     }
 }
 
@@ -606,7 +612,9 @@ child_pass_ctrlc (struct target_ops *self)
        {
          gdb_assert (inf->pid != 0);
 
+#ifndef _WIN32
          kill (inf->pid, SIGINT);
+#endif
          return;
        }
     }
@@ -712,7 +720,7 @@ child_terminal_info (struct target_ops *self, const char *args, int from_tty)
       return;
     }
 
-  if (ptid_equal (inferior_ptid, null_ptid))
+  if (inferior_ptid == null_ptid)
     return;
 
   inf = current_inferior ();
@@ -819,11 +827,11 @@ check_syscall (const char *msg, int result)
 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
@@ -902,7 +910,7 @@ static void
 pass_signal (int signo)
 {
 #ifndef _WIN32
-  kill (ptid_get_pid (inferior_ptid), SIGINT);
+  kill (inferior_ptid.pid (), SIGINT);
 #endif
 }
 
@@ -983,7 +991,7 @@ _initialize_inflow (void)
   /* 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);
This page took 0.035698 seconds and 4 git commands to generate.