This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Support Windows in event-loop.c


Mark Kettenis wrote:

The problem here is that traditional gdb programmers are familliar
with POSIX and therefore certainly with select, and probably with
poll.  They might very well not be familliar with Windows and the
magic of WaitForMultipleObjects.  If we accept the patch as-is, the
number of people that can hack on the event loop code decreases since
the number of people who are familliar with both Windows and POSIX is
smaller than the number of people who know about POSIX.  This is why I
think it would be preferable if an emulation for select or poll would
be used here.

The flip side of this argument is that unless we can provide something that really does behave like select, people will *think* they understand what's going on in this code, but won't. For example, if we end up with a select that can't handle waiting for "write" events on file descriptors, then at some point someone might add such a thing, and then Windows will break.


This is a somewhat different situation from the sockets situation, where the Windows API is very nearly identical to the UNIX API, modulo spelling, for the purposes of GDB. Intuition about UNIX sockets applies to Windows sockets, but intuition about UNIX file descriptors and select doesn't apply all that well to Windows.

I have a feeling, though, that I'm shouting into the wind. I understand that the GDB community is POSIX-centric and of course GNU is Not UNIX, rather than Not Windows. I understand that, and it's much more important to me that the functionality be provided than that any particular form be used.

I think my current intent is to wait for Chris' comments re. WaitForMultipleObjects and then try to make something that works like a limited form of select.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]