gdbserver/Windows: crash during connection establishment phase
[deliverable/binutils-gdb.git] / gdb / inflow.c
index 7c5e90470309093d14d83c8f36d37eeafb9d6586..08e47d65cb1f06db9940b5f9d598f66b4b199ea0 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"
@@ -469,7 +469,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 +565,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 +610,9 @@ child_pass_ctrlc (struct target_ops *self)
        {
          gdb_assert (inf->pid != 0);
 
+#ifndef _WIN32
          kill (inf->pid, SIGINT);
+#endif
          return;
        }
     }
@@ -983,7 +989,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.024548 seconds and 4 git commands to generate.