From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20550 invoked by alias); 20 Mar 2019 08:55:46 -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 20542 invoked by uid 89); 20 Mar 2019 08:55:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=stopping 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; Wed, 20 Mar 2019 08:55:44 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6X0g-0007l5-Mv; Wed, 20 Mar 2019 04:55:42 -0400 Received: from [176.228.60.248] (port=2308 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h6X0g-0008KU-5J; Wed, 20 Mar 2019 04:55:42 -0400 Date: Wed, 20 Mar 2019 08:55:00 -0000 Message-Id: <83zhppsz5i.fsf@gnu.org> From: Eli Zaretskii To: palves@redhat.com CC: tom@tromey.com, gdb-patches@sourceware.org In-reply-to: <83ftritydv.fsf@gnu.org> (message from Eli Zaretskii on Tue, 19 Mar 2019 22:14:36 +0200) 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> 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/msg00424.txt.bz2 > Date: Tue, 19 Mar 2019 22:14:36 +0200 > From: Eli Zaretskii > CC: tom@tromey.com, gdb-patches@sourceware.org > > > Cc: gdb-patches@sourceware.org > > From: Pedro Alves > > Date: Tue, 19 Mar 2019 19:02:43 +0000 > > > > > https://sourceware.org/ml/gdb-patches/2008-02/msg00423.html > > Caveat: I didn't yet read that thread myself. I have now. So yes, this is about SIGINT handler being run on Windows in a separate thread. Since the Readline SIGINT handler executes non-trivial Readline code, it should first stop the main thread in its tracks. But the question in the case of GDB is: could GDB run Readline code in more than one thread simultaneously? And also, when the Readline handler invokes the GDB handler, can the code run by the GDB SIGINT handler get in the way of some other GDB code which runs concurrently? This latter consideration might become more relevant with Tom's work on multi-threading the symtab reading. I'm not familiar with the current GDB architecture (specifically of the Windows port) well enough to answer my own questions on this matter. These questions are relevant because if threads other than the main one could be involved in this, we will have to stop them as well for as long as the SIGINT handler runs, and doing that from Readline's own code might prove tricky. By contrast, stopping just the main thread could be done entirely in the Readline sources. Comments?