Pass INTERNAL_GDBFLAGS when executing GDB
[deliverable/binutils-gdb.git] / gdbserver / remote-utils.cc
index 6249691954d62d1d347e66963f4a5bcd5fbf01d9..c26668dc0f8a902241e7b0b2faab6e550ad31326 100644 (file)
 #include <ws2tcpip.h>
 #endif
 
-#if __QNX__
-#include <sys/iomgr.h>
-#endif /* __QNX__ */
-
 #ifndef HAVE_SOCKLEN_T
 typedef int socklen_t;
 #endif
 
 #ifndef IN_PROCESS_AGENT
 
-#if USE_WIN32API
-# define INVALID_DESCRIPTOR INVALID_SOCKET
-#else
-# define INVALID_DESCRIPTOR -1
-#endif
-
 /* Extra value for readchar_callback.  */
 enum {
   /* The callback is currently not scheduled.  */
@@ -108,8 +98,8 @@ struct sym_cache
 
 static int remote_is_stdio = 0;
 
-static gdb_fildes_t remote_desc = INVALID_DESCRIPTOR;
-static gdb_fildes_t listen_desc = INVALID_DESCRIPTOR;
+static int remote_desc = -1;
+static int listen_desc = -1;
 
 #ifdef USE_WIN32API
 # define read(fd, buf, len) recv (fd, (char *) buf, len, 0)
@@ -119,7 +109,7 @@ static gdb_fildes_t listen_desc = INVALID_DESCRIPTOR;
 int
 gdb_connected (void)
 {
-  return remote_desc != INVALID_DESCRIPTOR;
+  return remote_desc != -1;
 }
 
 /* Return true if the remote connection is over stdio.  */
@@ -425,7 +415,7 @@ remote_close (void)
   if (! remote_connection_is_stdio ())
     close (remote_desc);
 #endif
-  remote_desc = INVALID_DESCRIPTOR;
+  remote_desc = -1;
 
   reset_readchar ();
 }
@@ -788,7 +778,7 @@ check_remote_input_interrupt_request (void)
   /* This function may be called before establishing communications,
      therefore we need to validate the remote descriptor.  */
 
-  if (remote_desc == INVALID_DESCRIPTOR)
+  if (remote_desc == -1)
     return;
 
   input_interrupt (0);
@@ -810,28 +800,6 @@ block_unblock_async_io (int block)
 #endif
 }
 
-#ifdef __QNX__
-static void
-nto_comctrl (int enable)
-{
-  struct sigevent event;
-
-  if (enable)
-    {
-      event.sigev_notify = SIGEV_SIGNAL_THREAD;
-      event.sigev_signo = SIGIO;
-      event.sigev_code = 0;
-      event.sigev_value.sival_ptr = NULL;
-      event.sigev_priority = -1;
-      ionotify (remote_desc, _NOTIFY_ACTION_POLLARM, _NOTIFY_COND_INPUT,
-               &event);
-    }
-  else
-    ionotify (remote_desc, _NOTIFY_ACTION_POLL, _NOTIFY_COND_INPUT, NULL);
-}
-#endif /* __QNX__ */
-
-
 /* Current state of asynchronous I/O.  */
 static int async_io_enabled;
 
@@ -845,9 +813,6 @@ enable_async_io (void)
   block_unblock_async_io (0);
 
   async_io_enabled = 1;
-#ifdef __QNX__
-  nto_comctrl (1);
-#endif /* __QNX__ */
 }
 
 /* Disable asynchronous I/O.  */
@@ -860,10 +825,6 @@ disable_async_io (void)
   block_unblock_async_io (1);
 
   async_io_enabled = 0;
-#ifdef __QNX__
-  nto_comctrl (0);
-#endif /* __QNX__ */
-
 }
 
 void
This page took 0.0255 seconds and 4 git commands to generate.