From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75514 invoked by alias); 23 Apr 2019 05:54:18 -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 75406 invoked by uid 89); 23 Apr 2019 05:54:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=compensate, HContent-type:iso-8859-1, sk:brobeck, certainly 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; Tue, 23 Apr 2019 05:54:16 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIoNh-0003y2-BA; Tue, 23 Apr 2019 01:54:13 -0400 Received: from [176.228.60.248] (port=4865 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hIoNg-00049D-Br; Tue, 23 Apr 2019 01:54:12 -0400 Date: Tue, 23 Apr 2019 05:54:00 -0000 Message-Id: <83bm0x5ksj.fsf@gnu.org> From: Eli Zaretskii To: =?iso-8859-1?Q?Andr=E9_P=F6nitz?= CC: palves@redhat.com, brobecker@adacore.com, gdb-patches@sourceware.org In-reply-to: <20190422214607.GA2372@klara.mpi.htwm.de> (message from =?iso-8859-1?Q?Andr=E9=09P=F6nitz?= on Mon, 22 Apr 2019 23:46:07 +0200) Subject: Re: [RFA 2/2][master only] gdb/windows-nat.c: Get rid of main_thread_id global References: <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> <20190419204326.GA9601@adacore.com> <20190422152327.GA10697@klara.mpi.htwm.de> <7f39cca0-c200-430e-e885-32cc347207d0@redhat.com> <20190422214607.GA2372@klara.mpi.htwm.de> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00447.txt.bz2 > Date: Mon, 22 Apr 2019 23:46:07 +0200 > From: André Pönitz > Cc: Joel Brobecker , Eli Zaretskii , > gdb-patches@sourceware.org > > > - be quiet wrt to threads with single-threaded programs. > > TBH, I don't see the necessity of this requirement. That would be two > lines of noise per run. It violates the same principle of least astonishment, in the important use case of a program that has only one application thread, the main thread. And please also keep in mind that we are not talking about introducing a new feature, we are talking about preserving an existing feature, in a way that will avoid crashing GDB in some rare cases. It sounds wrong to me to lose a feature because its implementation causes problems in a rare use case; we should instead fix the implementation. > > - inform the user the main thread exited while other threads stay running. > > Also here, I don't see enough gain in one suppressed line of output > to compensate for the inconsistency, this time even with a CLI user hat on. Forgive me for asking, but do you frequently debug with GDB on Windows? Because this issue is specific to native Windows debugging, it won't affect any other platforms. On Windows, we already have threads popping up and exiting that are started by the OS beyond our control, which is already quite jarring even to me, certainly to someone who doesn't debug day in and day out. Having the main thread of my program add more noise is not insignificant, because ideally I don't want to see any of my application threads shown unless my program really started a thread. Thanks.