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


Daniel Jacobowitz wrote:

Anyway, if Mark can come up with a select wrapper, then maybe we can
drop the question entirely.

I'm sure I can, if that's the only way to get this functionality into GDB. But, the emacs select wrapper is hardly a full implementation of select; for example, it only handles file descriptors waiting for "read", not "write". To me, adding a partial emulation of a POSIX function, without real POSIX semantics and behavior, is confusing. And adding a full emulation is going to be a lot more code than the present change -- and will perform worse to boot.


Windows isn't UNIX, and waiting for activity on file descriptors is one of the places where Windows made some rather different choices. This is a low-level system-programming code, and so system details appear. It's like dealing with different rules for interruptable syscalls, different signal-handling rules, and so forth.

Fortunately, it doesn't look like event-loop.c is a very active area of development. It looks like the last substantive change was on 2002-05-14. It seems unlikely to me that this change is going to make it a lot harder for people to make other improvements to event-loop.c.

--
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]