This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: PATCH: propagate gdb host keyboard interrupts through gdbserver
>>>>> "Greg" == Greg McGary <greg@mcgary.org> writes:
>> ... I noticed that code uses a NULL ptr for the timeout argument
>> instead of constructing a zeroed timeval. I'd go for the NULL ptr
>> approach instead of the timeval. It avoids problems with those
>> systems that don't have sys/time.h.
Greg> NULL means never timeout, i.e. block awaiting I/O. zeroed
Greg> timeval means timeout immediately if there's no I/O. An
Greg> alternative to select is to set NDELAY on the socket with fcntl.
Greg> Yes, i should add a comment explaining why all this rot is
Greg> necessary: because I observed NetBSD delivering redundant
Greg> SIGIOs.
Duh. And I even read the manpage while composing my reply. Perhaps I
need reading glasses (or is that comprehension glasses?).
It also appears that my worries about targets not having sys/time.h
are not well founded. I surveyed the GDB sources and found that many,
including remote.c which is included in practically every config,
which include sys/time.h without special consideration.
I still think we'll need to handle unistd.h though.
--jtc
--
J.T. Conklin
RedBack Networks