From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 98042385E001 for ; Wed, 9 Jun 2021 16:52:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 98042385E001 Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ABC70340BB4; Wed, 9 Jun 2021 16:52:26 +0000 (UTC) Date: Wed, 9 Jun 2021 12:52:25 -0400 From: Mike Frysinger To: Pedro Alves Cc: Tom Tromey , Mike Frysinger via Gdb-patches Subject: Re: [PATCH 4/4] gnulib: import select Message-ID: Mail-Followup-To: Pedro Alves , Tom Tromey , Mike Frysinger via Gdb-patches References: <20210529172510.16285-1-vapier@gentoo.org> <20210529172510.16285-4-vapier@gentoo.org> <87bl8hn3y5.fsf@tromey.com> <46d0d024-1892-3584-3523-e8f5b2997630@palves.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <46d0d024-1892-3584-3523-e8f5b2997630@palves.net> X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2021 16:52:36 -0000 On 09 Jun 2021 13:27, Pedro Alves wrote: > On 2021-06-08 5:52 a.m., Mike Frysinger via Gdb-patches wrote: > > On 07 Jun 2021 08:29, Tom Tromey wrote: > >>>>>>> "Mike" == Mike Frysinger via Gdb-patches writes: > >> > >> Mike> A few sims use this to emulate the syscall & provide network > >> Mike> functionality. > >> > >> Thank you, I think this is ok. > >> > >> There are some gnulib modules that don't work well for gdb. > >> The only one I can really remember is 'stat'. Hopefully select isn't > >> one of them :) > > > > that would be unfortunate, but i guess we'll find out. i'm not sure how we > > can balance these tensions short of each project starting to carve out their > > own gnulib ports. > > I think that on Windows, gnulib's select module does something very similar to > what we do with ser-mingw.c's gdb_select: > > ~~~ > /* On Windows, gdb_select is implemented using WaitForMulpleObjects. > A "select thread" is created for each file descriptor. These > threads looks for activity on the corresponding descriptor, using > whatever techniques are appropriate for the descriptor type. When > that activity occurs, the thread signals an appropriate event, > which wakes up WaitForMultipleObjects. > ~~~ > > I've always feared that gnulib's select module would conflict with that, > but I don't know for sure. In theory, we should be able to replace all > that code by using gnulib's select instead, though I'm not sure gnulib > handles some particulars like Ctrl-C interruption. why do you think it would conflict ? the file doesn't seem to use select() at all, and ser-mingw is always enabled for mingw targets. seems like the func would just be ignored. > I think we can avoid some pain of someone tests the import on Windows before > merging to master. it's already merged ;) gdb.exe links for me for i686-w64-mingw32, but i don't really have any way of testing it runs, let alone run test suite. -mike