X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdbserver%2Fremote-utils.cc;h=c26668dc0f8a902241e7b0b2faab6e550ad31326;hb=43327b208ec6452c1a6accd40be965cdfa5c86a3;hp=6249691954d62d1d347e66963f4a5bcd5fbf01d9;hpb=55d7aec85e81c4597e94ebcc8b85f20a1d439bd0;p=deliverable%2Fbinutils-gdb.git diff --git a/gdbserver/remote-utils.cc b/gdbserver/remote-utils.cc index 6249691954..c26668dc0f 100644 --- a/gdbserver/remote-utils.cc +++ b/gdbserver/remote-utils.cc @@ -68,22 +68,12 @@ #include #endif -#if __QNX__ -#include -#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