This is the mail archive of the gdb-patches@sourceware.org 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: [RFA/mingw32] Adjust select emulation


On Mon, Apr 10, 2006 at 01:47:56PM -0400, Daniel Jacobowitz wrote:
>This patch makes a couple of changes to the gdb_select emulation, to make
>it work more reliably:
>
>  - Check using ioctlsocket FIONREAD before starting a thread for network
>    sockets.  I'm not entirely sure that this change is responsible, but
>    something in this patch makes MinGW TCP debugging a whole lot faster,
>    and I think it's this.
>  - Check using _kbhit before starting a thread for consoles.  This
>    makes select return readable when getch() has returned \xE0 and is
>    holding on to the second half of an arrow or function key.  With
>    readline 5.1, this is necessary for arrow keys to be processed
>    in a timely fashion.
>  - Use simpler synchronization models for the select threads, by adding
>    an explicit "done now, go to sleep" step after gdb_select.  This
>    prevents race conditions between the network select thread and recv,
>    which could cause TCP communication to mysteriously lock up if you
>    were unlucky about how long your stub took to send a packet.
>
>I think it's much clearer now.  It definitely works better.
>
>Chris, does this look OK?

I just skimmed it but it looks ok.

cgf


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