From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id C7A753858C62 for ; Mon, 28 Nov 2022 15:12:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C7A753858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 198661E11A; Mon, 28 Nov 2022 10:12:53 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1669648373; bh=kJRexD+eCXI4rtORfxUoUQ0PXmFGQ+seZjlgsEcusro=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=NNqDae2TMz2aPKBYIWWWyHNPJFcV8byIfqy8lxJyJtoSVMKjDHpTEQS+WqFnLYTlG pK1DkjBPhx67jMmcIv+DYXfPfyS2AydKt/aFEuFDr0pSQ9pS+aj16izz5xx7mY9HMR jMFK353Y/EQnqBMHtKB3G6dbbvyqydN1m58u9df8= Message-ID: Date: Mon, 28 Nov 2022 10:12:52 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v2 3/6] gdbserver/linux-aarch64: Factor out function to get aarch64_features Content-Language: en-US To: Thiago Jung Bauermann , gdb-patches@sourceware.org Cc: Luis Machado References: <20221126020452.1686509-1-thiago.bauermann@linaro.org> <20221126020452.1686509-4-thiago.bauermann@linaro.org> From: Simon Marchi In-Reply-To: <20221126020452.1686509-4-thiago.bauermann@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/25/22 21:04, Thiago Jung Bauermann via Gdb-patches wrote: > It will be used in a subsequent commit. There's no functional change. > --- > gdbserver/linux-aarch64-low.cc | 33 +++++++++++++++++++++------------ > 1 file changed, 21 insertions(+), 12 deletions(-) > > diff --git a/gdbserver/linux-aarch64-low.cc b/gdbserver/linux-aarch64-low.cc > index a6ed68f93029..cab4fc0a4674 100644 > --- a/gdbserver/linux-aarch64-low.cc > +++ b/gdbserver/linux-aarch64-low.cc > @@ -652,6 +652,25 @@ aarch64_target::low_delete_process (arch_process_info *info) > xfree (info); > } > > +/* Matches HWCAP_PACA in kernel header arch/arm64/include/uapi/asm/hwcap.h. */ > +#define AARCH64_HWCAP_PACA (1 << 30) > + > +static struct aarch64_features > +aarch64_get_arch_features (const thread_info *thread) Please document the new function. > + struct aarch64_features features; > + int pid = pid_of (thread); > + > + features.vq = aarch64_sve_get_vq (lwpid_of (thread)); Just a note, I feel like the pid_of / lwpid_of functions (they used to be macros) are a vestige of when GDB was in C. Today, I would have no problem doing: thread->id.pid () thread->id.lwp () With the doc change done, Approved-By: Simon Marchi Simon