Adding Neutrino gdbserver.

* configure: Regenerated.
	* configure.ac: Add case for srv_qnx and set LIBS accordingly.
	* configure.srv (i[34567]86-*-nto*): New target.
	* nto-low.c, nto-low.h, nto-x86-low.c: New files.
	* remote-utils.c [__QNX__]: Include sys/iomgr.h
	(nto_comctrl) [__QNX__]: New function.
	(enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
This commit is contained in:
Aleksandar Ristovski 2009-07-06 18:31:20 +00:00
parent e235789238
commit ac8c974e4f
8 changed files with 1154 additions and 0 deletions

View file

@ -66,6 +66,10 @@
#include <winsock.h>
#endif
#if __QNX__
#include <sys/iomgr.h>
#endif /* __QNX__ */
#ifndef HAVE_SOCKLEN_T
typedef int socklen_t;
#endif
@ -814,6 +818,28 @@ unblock_async_io (void)
#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;
@ -828,6 +854,9 @@ enable_async_io (void)
signal (SIGIO, input_interrupt);
#endif
async_io_enabled = 1;
#ifdef __QNX__
nto_comctrl (1);
#endif /* __QNX__ */
}
/* Disable asynchronous I/O. */
@ -841,6 +870,10 @@ disable_async_io (void)
signal (SIGIO, SIG_IGN);
#endif
async_io_enabled = 0;
#ifdef __QNX__
nto_comctrl (0);
#endif /* __QNX__ */
}
void