From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108659 invoked by alias); 21 Mar 2019 18:30: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 108632 invoked by uid 89); 21 Mar 2019 18:30:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1221, our X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Mar 2019 18:29:58 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h72Rw-000143-9K; Thu, 21 Mar 2019 14:29:56 -0400 Received: from [176.228.60.248] (port=2923 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h72Rm-0005Nj-Up; Thu, 21 Mar 2019 14:29:49 -0400 Date: Thu, 21 Mar 2019 18:30:00 -0000 Message-Id: <83va0ct71i.fsf@gnu.org> From: Eli Zaretskii To: Pedro Alves CC: tom@tromey.com, gdb-patches@sourceware.org In-reply-to: <3e691193-19c4-056f-eeb5-7837a7e956b3@redhat.com> (message from Pedro Alves on Thu, 21 Mar 2019 17:31:07 +0000) Subject: Re: [PATCH] Readline: Cleanup some warnings References: <20190130085716.75179-1-alan.hayward@arm.com> <20190131075907.GA313@adacore.com> <3463805B-A8BF-4C20-ACE3-C21AE3F7DB62@arm.com> <20190201080533.GA31043@adacore.com> <877eejvfoq.fsf@tromey.com> <1549047248.2630.7.camel@skynet.be> <310315f8-62ab-2eff-042f-9f2ae9de07da@redhat.com> <87wokxtnlt.fsf@tromey.com> <83h8c1wdr5.fsf@gnu.org> <87imwex333.fsf@tromey.com> <711b6636-b02c-edb2-308d-5fddbf4c33a9@redhat.com> <83ftritydv.fsf@gnu.org> <3fc20d2b-5a49-928a-b474-f812f43a2c12@redhat.com> <3e691193-19c4-056f-eeb5-7837a7e956b3@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00469.txt.bz2 > Cc: tom@tromey.com, gdb-patches@sourceware.org > From: Pedro Alves > Date: Thu, 21 Mar 2019 17:31:07 +0000 > > So that means that the readline hack in mingw-hdep.c: > > /* With multi-threaded SIGINT handling, there is a race between the > readline signal handler and GDB. It may still be in > rl_prep_terminal in another thread. Do not return until it is > done; we can check the state here because we never longjmp from > signal handlers on Windows. */ > while (RL_ISSTATE (RL_STATE_SIGHANDLER)) > Sleep (1); > > with new-enough readline, is no longer doing anything, since the while > loop's condition is always false. > > However, there's another question that needs answering: what are we going to > do if even after upgrading our readline version, someone builds gdb against > the system readline, and the system readline happens to be an older version > that still depends on this or some other readline hack? We'll silently > regress. I think that we need to document the minimum readline version > somewhere (gdb/README?), and have something (configure?) enforce it. > (There's a RL_READLINE_VERSION symbol.) SGTM, thanks for digging into this.