From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9561 invoked by alias); 10 Jun 2006 20:41:36 -0000 Received: (qmail 9552 invoked by uid 22791); 10 Jun 2006 20:41:36 -0000 X-Spam-Check-By: sourceware.org Received: from fios.cgf.cx (HELO cgf.cx) (71.248.179.19) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 10 Jun 2006 20:41:34 +0000 Received: by cgf.cx (Postfix, from userid 201) id 0FD5413C01F; Sat, 10 Jun 2006 16:41:33 -0400 (EDT) Date: Sat, 10 Jun 2006 20:41:00 -0000 From: Christopher Faylor To: Masaki Muranaka , gdb-patches@sourceware.org Subject: Re: [patch] Crashed cross gdb/MinGW host Message-ID: <20060610204133.GC324@trixie.casa.cgf.cx> Mail-Followup-To: Masaki Muranaka , gdb-patches@sourceware.org References: <0494AFF8-AB9B-40E8-A4D2-C119DEEC5248@monami-software.com> <20060519185257.GA2667@trixie.casa.cgf.cx> <20060610182507.GA802@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060610182507.GA802@nevyn.them.org> User-Agent: Mutt/1.5.11 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00126.txt.bz2 On Sat, Jun 10, 2006 at 02:25:07PM -0400, Daniel Jacobowitz wrote: >On Fri, May 19, 2006 at 02:52:57PM -0400, Christopher Faylor wrote: >> On Fri, May 19, 2006 at 06:47:04PM +0900, Masaki Muranaka wrote: >> >My sh-elf-gdb on MinGW host was crashed when I tried to debug using the >> >serial connection. Here is a patch. >> > >> >It's possible the another plan to remove writefds check. There is no >> >support yet for writefds. >> >> If this is truly supposed to be an emulation of the system select(), I >> think it would make sense to check both !readfds and !writefds. > >Sorry for letting this sit so long. I just encountered this bug today. >I think I tested console and pipe when I last touched this code >but failed to test ser-base. > >The underlying problem is actually different. The code looks like >this: > if (!FD_ISSET (fd, readfds) && !FD_ISSET (fd, writefds)) > continue; > > if (FD_ISSET (fd, readfds)) > ... > > if (FD_ISSET (fd, exceptfds)) > ... > >See the mismatch? :-( I saw it and was wondering about it. I'm glad to see consistency restored. :-) cgf