From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56668 invoked by alias); 4 Aug 2015 21:57: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 56597 invoked by uid 89); 4 Aug 2015 21:57:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 04 Aug 2015 21:57:15 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 3762C8F266 for ; Tue, 4 Aug 2015 21:57:13 +0000 (UTC) Received: from pinnacle.lan (ovpn-113-100.phx2.redhat.com [10.3.113.100]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t74LvCUj009571 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA256 bits=256 verify=NO) for ; Tue, 4 Aug 2015 17:57:13 -0400 Date: Tue, 04 Aug 2015 21:57:00 -0000 From: Kevin Buettner To: gdb-patches@sourceware.org Subject: Re: [PATCH] Remove get_thread_id Message-ID: <20150804145710.6960cec1@pinnacle.lan> In-Reply-To: <20150804173043.GK4777@adacore.com> References: <1438260744-14116-1-git-send-email-yao.qi@linaro.org> <20150804173043.GK4777@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00100.txt.bz2 On Tue, 4 Aug 2015 10:30:43 -0700 Joel Brobecker wrote: > > This patch removes get_thread_id from aarch64-linux-nat.c, > > arm-linux-nat.c and xtensa-linux-nat.c. > > > > get_thread_id was added in this commit below in 2000, > > > > 41c49b06c471443d3baf2eaa2463a315f9b5edca > > https://sourceware.org/ml/gdb-patches/2000-04/msg00398.html > > > > which predates the ptid_t stuff added into GDB. Nowadays, lwpid of > > inferior_ptid is only zero when the inferior is created (in > > fork-child.c:fork_inferior) and its lwpid will be set after > > linux_nat_wait_1 gets the first event. After that, lwpid of > > inferior_ptid is not zero for linux-nat target, then we can use > > ptid_get_lwp, so this function isn't needed anymore. > > I'm not a specialist, but I tend to agree. I've always found > these GET_THREAD_ID macros, in particular, but be unecessary > and obfuscating. Yao's patch looks good to me too. Kevin