From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45449 invoked by alias); 19 Apr 2019 20:43:31 -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 45440 invoked by uid 89); 19 Apr 2019 20:43:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=alive, legitimately, H*f:sk:9c75d15, H*i:sk:9c75d15 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 Apr 2019 20:43:29 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 50693116C3F; Fri, 19 Apr 2019 16:43:28 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id yCS-WimlZ97m; Fri, 19 Apr 2019 16:43:28 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 27463116A68; Fri, 19 Apr 2019 16:43:28 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 6124D83C06; Fri, 19 Apr 2019 13:43:26 -0700 (PDT) Date: Fri, 19 Apr 2019 20:43:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: Eli Zaretskii , gdb-patches@sourceware.org Subject: Re: [RFA 2/2][master only] gdb/windows-nat.c: Get rid of main_thread_id global Message-ID: <20190419204326.GA9601@adacore.com> References: <1555453982-77808-1-git-send-email-brobecker@adacore.com> <1555453982-77808-3-git-send-email-brobecker@adacore.com> <83imvcg0ud.fsf@gnu.org> <20190417173842.GA14817@adacore.com> <83wojseb9c.fsf@gnu.org> <20190417221729.GA5839@adacore.com> <9c75d158-6a73-d414-4cb2-17297d4576c6@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9c75d158-6a73-d414-4cb2-17297d4576c6@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-SW-Source: 2019-04/txt/msg00390.txt.bz2 > > - patch #3 (master only): Tag the main thread, and silence > > the thread-exit notification of the thread that got tagged. > > Depending on the implementation, this patch would potentially > > be acceptable for 8.3, but might need extra work to apply. > > I think we've had enough problems with 8.3 as it is, I don't > > want to add more things to do, so I vote OUT for 8.3. > > This doesn't seem right to me, given that the main thread may > legitimately exit before other threads. If this approach is taken, > maybe tweak it a bit: > > silence the thread-exit notification of the thread that got tagged > _iff there are no other threads in the process_. Wouldn't that be confusing? What would happen in that case is that we end up getting a a thread-exit notification with a thread ID for which there hasn't been a new-thread notification. Without knowing the implementation details of how GDB decides to silence or not thread notifications, people are going to ask themselves where the thread that exited came from, and why we didn't see a new-thread notification for it before. To decide which approach we want to take - what would be the issue if we decided to silence the main thread's exit notification while some other threads might still be alive? Assuming Pedro is making a valid point, I think we should go back to pre-8.3 behavior, and show all thread create/exit notifications, including for the main thread. -- Joel