From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61613 invoked by alias); 2 Apr 2019 22:00:42 -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 61601 invoked by uid 89); 2 Apr 2019 22:00:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KHOP_DYNAMIC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=H*Ad:U*bergner, H*UA:Macintosh, HContent-Transfer-Encoding:8bit X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Apr 2019 22:00:41 +0000 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x32LuAEG064149 for ; Tue, 2 Apr 2019 18:00:39 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0a-001b2d01.pphosted.com with ESMTP id 2rmg3e054t-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 02 Apr 2019 18:00:39 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 2 Apr 2019 23:00:38 +0100 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 2 Apr 2019 23:00:34 +0100 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x32M0X0n19857494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 2 Apr 2019 22:00:33 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 98388124058; Tue, 2 Apr 2019 22:00:33 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 42E5C124053; Tue, 2 Apr 2019 22:00:33 +0000 (GMT) Received: from otta.local (unknown [9.80.227.147]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 2 Apr 2019 22:00:33 +0000 (GMT) Subject: Re: [PATCH 2/2] gdbserver: Add linux_get_hwcap To: Alan Hayward Cc: "gdb-patches@sourceware.org" , nd References: <20190325120542.92123-1-alan.hayward@arm.com> <20190325120542.92123-2-alan.hayward@arm.com> From: Peter Bergner Date: Tue, 02 Apr 2019 22:00:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190325120542.92123-2-alan.hayward@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit x-cbid: 19040222-2213-0000-0000-0000036F98EC X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010863; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000284; SDB=6.01183434; UDB=6.00619568; IPR=6.00964183; MB=3.00026265; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-02 22:00:36 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19040222-2214-0000-0000-00005DE183CE Message-Id: <4b84367d-bae9-55ef-4878-de585ee3b85d@linux.ibm.com> X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00013.txt.bz2 On 3/25/19 7:05 AM, Alan Hayward wrote: > * linux-ppc-low.c (ppc_get_auxv): Remove function. [snip] > diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c > index 1b695e53fe..8deb0ce068 100644 > --- a/gdb/gdbserver/linux-ppc-low.c > +++ b/gdb/gdbserver/linux-ppc-low.c > @@ -323,43 +323,6 @@ ppc_set_pc (struct regcache *regcache, CORE_ADDR pc) > } > } > > - > -static int > -ppc_get_auxv (unsigned long type, unsigned long *valp) > -{ > - const struct target_desc *tdesc = current_process ()->tdesc; > - int wordsize = register_size (tdesc, 0); > - unsigned char *data = (unsigned char *) alloca (2 * wordsize); > - int offset = 0; > - > - while ((*the_target->read_auxv) (offset, data, 2 * wordsize) == 2 * wordsize) > - { > - if (wordsize == 4) > - { > - unsigned int *data_p = (unsigned int *)data; > - if (data_p[0] == type) > - { > - *valp = data_p[1]; > - return 1; > - } > - } > - else > - { > - unsigned long *data_p = (unsigned long *)data; > - if (data_p[0] == type) > - { > - *valp = data_p[1]; > - return 1; > - } > - } > - > - offset += 2 * wordsize; > - } > - > - *valp = 0; > - return 0; > -} > - > #ifndef __powerpc64__ > static int ppc_regmap_adjusted; > #endif > @@ -944,8 +907,8 @@ ppc_arch_setup (void) > > /* The value of current_process ()->tdesc needs to be set for this > call. */ > - ppc_get_auxv (AT_HWCAP, &ppc_hwcap); > - ppc_get_auxv (AT_HWCAP2, &ppc_hwcap2); > + ppc_hwcap = linux_get_hwcap (features.wordsize); > + ppc_hwcap2 = linux_get_hwcap2 (features.wordsize); > > features.isa205 = ppc_linux_has_isa205 (ppc_hwcap); > You have removed ppc_get_auxv(), but I'm still seeing uses of it that function which are causing build errors (powerpc64le-linux): /home/bergner/binutils/binutils-gdb/gdb/gdbserver/linux-ppc-low.c: In function ‘int is_elfv2_inferior()’: /home/bergner/binutils/binutils-gdb/gdb/gdbserver/linux-ppc-low.c:1113:8: error: ‘ppc_get_auxv’ was not declared in this scope if (!ppc_get_auxv (AT_PHDR, &phdr)) Peter