From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43956 invoked by alias); 24 Feb 2019 17:26:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 43930 invoked by uid 89); 24 Feb 2019 17:25:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=claim X-HELO: gateway21.websitewelcome.com Received: from gateway21.websitewelcome.com (HELO gateway21.websitewelcome.com) (192.185.45.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 24 Feb 2019 17:25:58 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway21.websitewelcome.com (Postfix) with ESMTP id C4610400C8629 for ; Sun, 24 Feb 2019 11:25:56 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id xxXIgoFUU90onxxXIg9NIy; Sun, 24 Feb 2019 11:25:56 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=IAY67nPoMgjpOy0bvJqFAFU/C2tPJHBf00Rto1QbMBQ=; b=YtiSdjBeXRql5uDxX+Xh4e+rEP i8UZlmMJgL2vIMaPbyxY7/g7BbtBtLsJg7DvavR16qWj7XTytrOOLQ6vXyPXWn8X7MgMmsVZ9Z3dK UgavxcIQsgHuDShnajlg/E1dw; Received: from 75-166-72-210.hlrn.qwest.net ([75.166.72.210]:54942 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gxxXI-001GHD-Hd; Sun, 24 Feb 2019 11:25:56 -0600 From: Tom Tromey To: Eli Zaretskii Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFC 00/17] Merge event loop implementations References: <20190224165153.5062-1-tom@tromey.com> <83sgwdnm6r.fsf@gnu.org> Date: Sun, 24 Feb 2019 17:26:00 -0000 In-Reply-To: <83sgwdnm6r.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 24 Feb 2019 19:14:20 +0200") Message-ID: <87va19jdy4.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-02/txt/msg00410.txt.bz2 >>>>> "Eli" == Eli Zaretskii writes: Eli> The problem here is that Windows' implementation of 'select' works Eli> only on sockets, and wants HSOCKET handles instead of file Eli> descriptors. If you feed it a file descriptor, it won't work, even if Eli> the descriptor is for a socket. Thanks. I am still not sure what to do. Move the mingw-hdep select code to common? Or is it better to reintroduce gdb_fildes_t and use it everywhere? The former seems simpler I suppose, but the way that the mingw-hdep select implementation relies on readline gives me pause. Though perhaps that code will be removed in the readline upgrade, when I get back to that? So one idea might be to try to land that first. Eli> I cannot really tell, by reading the patches, what code would Eli> gdbserver on Windows use after this series, so I don't know whether it Eli> will be broken or not. But one thing I do see is that mingw-hdep.c Eli> doesn't support waiting on write descriptors, whereas gdbserver's Eli> event-loop.c seems to support that. Both event loops claim to support it, but in practice it isn't actually exposed via the API -- the only exposed API is add_file_handler, which doesn't allow for requesting a write notification. All the write stuff is dead code. One other thing I forgot to mention is that maybe it would be nice to just remove gdb's event loop entirely in favor of something like libevent. Though of course it is a pain to introduce a new dependency. Tom