From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by sourceware.org (Postfix) with ESMTPS id 7EA203858D1E for ; Tue, 29 Nov 2022 03:26:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7EA203858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oi1-x230.google.com with SMTP id l127so13859540oia.8 for ; Mon, 28 Nov 2022 19:26:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=iiHjh80gFSYVY51whUxqDGSWJqOd/0UJ/78kA8RRlqo=; b=Pbv0a3nthjWNF4m4X/x+jkWJ2411bU5vo/s3V5bKJKJvJwtoQBf2N1OiU1wc60y+UI f7LW9zFsiH3uSQxu0W7xyYvGu8Bunpreb/xW+Ph89hUglqFg4jp3OM8YduefzHzVRbp6 /Dj5P15mOy5bWWLgYAlOGZduT0KZm4fSH9wcDw6Dkl+uMQsmcUtG/3f3QxFz8OswUYuB 0waF1v/d1RD8MOrDjH/IrhMp3VppUFU0KigdPsFViLc7PLmKVXcD1pGox9CVnl+DrR2r O/MxOnqLu+DGLdTUjEId08Gip0mId7UKXzxGdCwxZfezf9tqFGmGbZgw8RaBeBncsC6i yEzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iiHjh80gFSYVY51whUxqDGSWJqOd/0UJ/78kA8RRlqo=; b=1Wabpl+NqcvOFOUdSe01vYOUu/eWQPrekQlzHqIroDUMcqDVCJ+6wWem2m7d0vJwpK 1T7O5DpKkwcb/kjqC2MXhRhasdtcGEF6AQX+cH8SfD5tsif7xbS8EOPGyvl2sk9CdZdo rV0AQKlthaN5ms7S+Xe8GXYl11kqGeIGaMXYxoQAnduLilRnaGqp4Px3mxzjz5RupNa3 Ai0rPZsqfn9w9WLVOxUu65TyDlOfgTJvT6q34AgKD9f6i+Tg5PdHcbK8Wo8ZZidPCl/5 fhZ2FAlKMX6/5lvyGDhPcHaw3FkLYQgylL+lhaIvmvjZSsJgSlzftoN6RleiU0IJKQUM WrHg== X-Gm-Message-State: ANoB5pnTbi3gkVlJwd9q0zsDtitHTVbxr5gcLlYFRbIqEsmdHyjY7Doi wTBEI7cR6U3zGRPJbW/lNJc5kQ== X-Google-Smtp-Source: AA0mqf71VKutkAq8s+91PKSknedl5XytaXURp7gCy0iLfvvR/AR3CVWr+B3pY0QF3KlbkxCLsBqVoA== X-Received: by 2002:aca:b344:0:b0:359:a292:2b4d with SMTP id c65-20020acab344000000b00359a2922b4dmr29136825oif.284.1669692409838; Mon, 28 Nov 2022 19:26:49 -0800 (PST) Received: from localhost ([2804:14d:7e39:8470:201c:ea26:41ce:5eb]) by smtp.gmail.com with ESMTPSA id j11-20020a056870050b00b0012d939eb0bfsm6825990oao.34.2022.11.28.19.26.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 19:26:49 -0800 (PST) References: <20221126020452.1686509-1-thiago.bauermann@linaro.org> <20221126020452.1686509-4-thiago.bauermann@linaro.org> User-agent: mu4e 1.8.11; emacs 28.2 From: Thiago Jung Bauermann To: Simon Marchi Cc: gdb-patches@sourceware.org, Luis Machado Subject: Re: [PATCH v2 3/6] gdbserver/linux-aarch64: Factor out function to get aarch64_features In-reply-to: Date: Tue, 29 Nov 2022 03:26:46 +0000 Message-ID: <87pmd6h24p.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain 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,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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: Simon Marchi writes: > 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. Done for v3. >> + 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 () Ah, thanks for the note. I changed occurrences of pid_of and lwpid_of in this patch and the previous one (which are the only patches in this series where the functions were added) to the above. > With the doc change done, > > Approved-By: Simon Marchi Thanks! Added the Approved-by tag to the patch description for v3. -- Thiago