From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114845 invoked by alias); 5 Apr 2019 16:39:56 -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 114701 invoked by uid 89); 5 Apr 2019 16:39:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KHOP_DYNAMIC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.1 spammy=HX-Envelope-From:sk:uweigan, H*F:U*uweigand, H*x:2.5, H*UA:2.5 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; Fri, 05 Apr 2019 16:39:55 +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 x35GZMqT134433 for ; Fri, 5 Apr 2019 12:39:53 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2rpacwgx04-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 05 Apr 2019 12:39:52 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 5 Apr 2019 17:39:50 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 5 Apr 2019 17:39:48 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x35GdkT337421204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 5 Apr 2019 16:39:46 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C6BEFA404D; Fri, 5 Apr 2019 16:39:46 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B15DAA4053; Fri, 5 Apr 2019 16:39:46 +0000 (GMT) Received: from oc3748833570.ibm.com (unknown [9.145.53.185]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 5 Apr 2019 16:39:46 +0000 (GMT) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id 2DB32D802DA; Fri, 5 Apr 2019 18:39:46 +0200 (CEST) Subject: Re: [PATCH 2/2] gdbserver: Add linux_get_hwcap To: pedromfc@linux.ibm.com (Pedro Franco de Carvalho) Date: Fri, 05 Apr 2019 16:39:00 -0000 From: "Ulrich Weigand" Cc: Alan.Hayward@arm.com (Alan Hayward), simark@simark.ca (Simon Marchi), gdb-patches@sourceware.org (gdb-patches\@sourceware.org), nd@arm.com (nd), anton@linux.ibm.com In-Reply-To: <875zrsctal.fsf@linux.vnet.ibm.com> from "Pedro Franco de Carvalho" at Apr 05, 2019 01:26:26 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit x-cbid: 19040516-0012-0000-0000-0000030BB746 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19040516-0013-0000-0000-00002143CD18 Message-Id: <20190405163946.2DB32D802DA@oc3748833570.ibm.com> X-SW-Source: 2019-04/txt/msg00087.txt.bz2 Pedro Franco de Carvalho wrote: > Note that there is a difference in the interface between linux_get_auxv > and linux_get_hwcap(2), the latter still return both the status and the > entry value, but I didn't want to change all their users. Actually, I think this is fine -- for hwcap, 0 is a natural default value to use if the entry is not present. > Also, contrary to the gdb client version (target_auxv_search > gdb/auxv.c), this one doesn't differentiate between an error and the > entry not being found. That also seems reasonable. If anybody requires more specific error handling, that can always be added later. > gdb/gdbserver/ChangeLog: > 2019-04-DD Pedro Franco de Carvalho > > * linux-low.c (linux_get_auxv): Remove static. Return auxv entry > value in argument pointer, return 1 if the entry is found and 0 > otherwise. Move comment. > (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv. > * linux-low.h (linux_get_auxv): Declare. > * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv. This is OK. Thanks, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com