From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17920 invoked by alias); 11 Feb 2019 03:21:20 -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 17912 invoked by uid 89); 11 Feb 2019 03:21:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*u:1.3.6, H*UA:1.3.6, personal X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Feb 2019 03:21:19 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id x1B3LCBL007621 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 10 Feb 2019 22:21:17 -0500 Received: by simark.ca (Postfix, from userid 112) id 4CA981E64C; Sun, 10 Feb 2019 22:21:12 -0500 (EST) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 745F31E152; Sun, 10 Feb 2019 22:21:09 -0500 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 11 Feb 2019 03:21:00 -0000 From: Simon Marchi To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFA/commit] (Windows) remove thread notification for main thread of inferior In-Reply-To: <20190210132204.6139-1-brobecker@adacore.com> References: <20190210132204.6139-1-brobecker@adacore.com> Message-ID: <72558bcdf9f15fa3d1c569cc1c689996@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2019-02/txt/msg00115.txt.bz2 Hi Joel, I didn't test, but this looks good to me. Two small comments below. > diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c > index 2894b208f58..ae05d889a6a 100644 > --- a/gdb/windows-nat.c > +++ b/gdb/windows-nat.c > @@ -426,9 +426,17 @@ thread_rec (DWORD id, int get_context) > return NULL; > } > > -/* Add a thread to the thread list. */ > +/* Add a thread to the thread list. > + > + PTID is the ptid of the thread to be deleted. > + H is its Windows handle. > + TLB is its thread local base. > + MAIN_THREAD_P should be true if the thread to be deleted is > + the main thread, false otherwise. */ This comment about the function that adds threads talks about things to be deleted. > + > static windows_thread_info * > -windows_add_thread (ptid_t ptid, HANDLE h, void *tlb) > +windows_add_thread (ptid_t ptid, HANDLE h, void *tlb, > + bool main_thread_p = false) Just a nit: in this case, where there are very few callers to update, I would opt for not using a default parameter value. It's probably just a personal preference, but I find it clearer to have the explicit value at the call site. Simon