From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23323 invoked by alias); 27 Sep 2019 14:05:35 -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 23315 invoked by uid 89); 27 Sep 2019 14:05:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 spammy=headaches X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (207.211.31.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 Sep 2019 14:05:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1569593132; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4yOEdC0A4G3JboxFmf/+gmz4FoKPznNV1Pf2NJp7qb0=; b=KaHbUZAmMjsP9hdhMq0BGgQT04jaOvcoU1licVuaobedc1daGLpP2zgZz4jO2OPus/WX3z FPO+YydswjLQETGsw1Jue7zqQDS8G080fq5yyOvCO+sjYKLdcIH9m2sa+g0/NNNb9gkNcu RkLb8HPq+rZYSBSfJW+jUtGLCzQZNQE= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-269-3EA_4QpQNgeL9dkwCCPg5Q-1; Fri, 27 Sep 2019 10:05:30 -0400 Received: by mail-wr1-f71.google.com with SMTP id q10so1039944wro.22 for ; Fri, 27 Sep 2019 07:05:30 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id b22sm7555440wmj.36.2019.09.27.07.05.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Sep 2019 07:05:28 -0700 (PDT) Subject: Re: [RFC 00/17] Merge event loop implementations To: Tom Tromey References: <20190224165153.5062-1-tom@tromey.com> <3ae5ab8e-c219-6510-bb54-b30c1cf2d074@redhat.com> <87mueqslhn.fsf@tromey.com> <52b71425-e839-99fa-5045-8aaa02eafaef@redhat.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <362e3e88-6e13-598c-6167-91076a6c478e@redhat.com> Date: Fri, 27 Sep 2019 14:05:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <52b71425-e839-99fa-5045-8aaa02eafaef@redhat.com> X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-09/txt/msg00553.txt.bz2 On 9/27/19 2:53 PM, Pedro Alves wrote: > On 9/27/19 12:09 AM, Tom Tromey wrote: >>>>>>> "Pedro" =3D=3D Pedro Alves writes: >> >> I'll reply to the rest later, after I absorb it. >> >>>> Given that, I removed gdb_fildes_t in this series. However, perhaps >>>> it is still needed and this series needs some more work. I could use >>>> some advice here -- when is this code actually needed and is there a >>>> way I can reproduce any problems? I don't have a Windows host, so I'm >>>> hoping for some sort of compile-time error using a mingw cross. >> >> Pedro> This was already discussed. Do I understand correctly that you're >> Pedro> going to try to replace gdb_select with gnulib's select? >> >> Well, that was an idea, but at Cauldron you pointed out that I could >> test the event loop under Wine. Also, this week I finally got a gdb >> build working on Windows, so I may just try that instead. My thinking >> for both of these is that if the code seems to work ok, then there's no >> reason to attempt the gnulib thing. >=20 > Ah, OK. Using the gnulib select would make gdbserver's stdio mode > usable on Windows too, but that's certainly not something required > for this patch series. Can always be done at some other time. >=20 > What's the plan for gdb_fildes_t then? FYI, the patch that introduced gdb_fildes_t came from here: https://sourceware.org/ml/gdb-patches/2010-08/msg00459.html Here MSDN talks about Unix vs Windows SOCKET types: https://docs.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2 But, given that gdb (unlike gdbserver), has been using "int" for sockets on Windows for a long while, and 64-bit Windows has been a thing for a long while too, I wonder whether in practice Windows just makes sure that SOCKET handles fit in 32-bit integers, exactly to avoid porting headaches... Given that GDB has been using int, I guess that indeed, we could most probably ignore this issue and get rid of gdb_fildes_t. I'm not 100% sure of that, but the evidence suggests it. Thanks, Pedro Alves