From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id afh1HwIpsGlrviEAWB0awg (envelope-from ) for ; Tue, 10 Mar 2026 10:21:54 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=cD99I2l8; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 796001E0DD; Tue, 10 Mar 2026 10:21:54 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9AB941E08D for ; Tue, 10 Mar 2026 10:21:53 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id BD3954B9DB66 for ; Tue, 10 Mar 2026 14:21:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD3954B9DB66 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=cD99I2l8 Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by sourceware.org (Postfix) with ESMTPS id 4458D4B9DB5D for ; Tue, 10 Mar 2026 14:19:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4458D4B9DB5D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4458D4B9DB5D Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2001:4860:4864:20::2d ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1773152355; cv=pass; b=U0HJEUypD8Xb0NtdkTqLLtCBgl9cJvb+9/iQrI3xmYekXix9nFSSxHxF3oYiUHyKlcoJNlKBsjHNlmBM1dqmYeztNT8UL1PHKs+O8BbkiLLXKEGL8Lc3B8cENw04liubCHMfDijYeA0vbO/8CyzHEO/8NuOfC2KDzRASqjEvs38= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1773152355; c=relaxed/simple; bh=3IGE+kmihcbQfmahqk7IEZN1JFuh1Gxxd9v4eKTb44g=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=TqfS9ZCAUIUMRE+4Uqndy9LdpxSxSa+FvfN8xVFAnxFu4tr2z29YEUCUeXeQtlqiMV7rMKAQSrrIlw6qhQKuRo8lK6wTWpA2V0/p0RiLZHn546H6AEmAKpy2mOoAJFK5Gavxinza4tO+dn5pJX8BThMB4OEzN1WMy8U4mwfrzNU= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4458D4B9DB5D Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-41576c5c01cso4935258fac.3 for ; Tue, 10 Mar 2026 07:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773152354; cv=none; d=google.com; s=arc-20240605; b=IRoHyro6FyWLBj5CYcaW/8BP1i82IUGG26JZpIrn8cD+fqKa26PeVQcoBAXlMTfJmU nlpftBEYkvbRBqQ9Kv718g/8k62e2QtKUd5v9MLXi4BS2UK0o2yjjXgdYs8Sl6MQKa5N 0n1EDO1WFPHGhNH3/9VGm/OhaghQF4fpmV+mpbo1lab+aO3Oz9Iuyko5Y4NLdrVOFA8c ecBPA4FDcG6bSuux337X1Puzc2q/UCmpoVayGMNOErv2D28nwuL5V/qCwVe3uqHS1gbc yu2GjoKaiezslHZL2AAqq/sfsN7KpbJEh1/H0eAModylJFZY4EDUCveodorvo7p+TjyY Ws9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=uV5U7akTJaD28dT3X3G8N0FsMjf/Frwuu4xVwsqFPbE=; fh=w28SylgGMevp+OJ0GKSGUzlPhVgayu5JSBsUVoMn1Ls=; b=JVa75TaXp+jnHJ2RcL9b9RVU/dOXyLHIgNL7VsvHIXnNlRc6dm715jfpZ3ZEATCadn gwFMefPsB08/gLcyJt5I6S7hp1qPh/7tosbb5ZBVCoKdLdbp5DzeqfeVrcx2BgsvKUr4 liLJe+Bgtk0qWaDDkgDEHKKNRXbaYYccFJiS6fqbqZg8g9rdp9+wnHo8h+SIM0XGV204 gB+KtC74ppZ5DevG8aBI7+UvRxZw11xoy8mDuFMCFdzITiWKdLFGwbriNfu6gKxgnas7 2PjRw5pqWx7gVDG/XEdM94AtlhhZfvPFOzbE9R4WkZ4GDJaIvuxQFv7WGxvpEVb/pQQy KweA==; darn=sourceware.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773152354; x=1773757154; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=uV5U7akTJaD28dT3X3G8N0FsMjf/Frwuu4xVwsqFPbE=; b=cD99I2l8ne//In8tTlcZh5lLzNCN9svKUufDRHV2G4HHr+ZkH8ZU3kFX85R+qaeLwV b6ry/ICVkc8ppQ+OnEt/FVzeXxbJRX/JL8/6dBhG/fo65l6hw2F45ebWOPYRzzpdUXNf afDA/g4G+qU/rDD8KqfBOcDAnSRE7hT8ToWpwyldYQWqBXGZYtuJZy1Qzhku27qco6WH wfcuItn/iV46d2+pgdDQbu1UK9dhWNp/zDwypt9pdJs4hRWnPY2UUUy9BNBAwrFjweMn L92ZhDhPdasTupfZ7B5FGeXi4D+q/Upyesg2poP4aB/rXJh16GcWPAP88CTN9msEVHm8 6MGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773152354; x=1773757154; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uV5U7akTJaD28dT3X3G8N0FsMjf/Frwuu4xVwsqFPbE=; b=Ox4bSk0J72/d8rftfI6fdtktzwP5CLxcQwz63eY/UYaLcJjTNL6X0RuzN1bWNi3XVx xKrYMcrPmOBD8gGWReqNMeUO83/zD9vZJ0bjemD8LZOe2e1Pc+2iKXbHlKqtuOgutArg ETJGWLt4QJVGE3UZAUv6RSYnkEhGv8uA3fxv6WrBOwr/HFTXpSnd/LswE/4MBzaL8RHV vbI2r+gPuaL7pt5kHdRxeFIOvIUF5ihuA8JgN0DrCcbPI+tPglEbkTq+83v2x06fTVFQ 6BqXrQaG8rUoI0g7T5hdl3e94LjDmln0ocucQyzxEdnhL3kzpGxkZAw+7YV0+TzujFBM m12g== X-Forwarded-Encrypted: i=1; AJvYcCUndC6A7MaiOXwSykcnC4UVL2fpyWqTTAPs7LYKIkTOFcwiwt2jciiK9mptCSVff98yvRnoNToVFB0rKQ==@sourceware.org X-Gm-Message-State: AOJu0YyL0uf0sqTQtJNSSuHBE/gagVUlByeoqjHo1xr012SrBF/u/c0r kfqEL+kHJ9iq4vvS9guAY3YLzvnAqkiKZ1JDWbSh5D5fn0gvfT+rXt3d1msNEKLH4yS6Izuivrb xPXuNbfmFCsSCegv5DZSE6qkVRdHQ3wI= X-Gm-Gg: ATEYQzzu36ro1t9pKeRFyOexyovAPlMrMLhla6IU5paj/YOiFr5sBuFb73+C/Kn0BLH 1W08XXwbnuUJeZ1tsTsmZad5NLdJKqIORqRAyt66BKPPJYmidHG9Xc3L3MhT5NL5YCTwqaYLE6+ urPjDyPnB+2mEYfykyDAg9mWcSTRcmvqNpo18ySGbpAYt03OJM1k0aLvsySLi6aqP0bf1Ec18AN WRNGCGdQXI4I9jq9HsJ3iTfy/X5u6fTEwkGK7ebC9/of5it737ZWsMq27NduWGuppiEjFGOK2Cw SaV05sknZxMC0E1wCUWtloCTeG8zLcXXFaJYG+g= X-Received: by 2002:a05:6870:b606:b0:404:15e7:b86c with SMTP id 586e51a60fabf-416e3fa88d9mr8485028fac.3.1773152354373; Tue, 10 Mar 2026 07:19:14 -0700 (PDT) MIME-Version: 1.0 References: <20260303050641.198127-1-thiago.bauermann@linaro.org> <643ff55e-b906-40e0-aef9-847b1af9a7c1@simark.ca> <87wlzscktm.fsf@linaro.org> In-Reply-To: <87wlzscktm.fsf@linaro.org> From: Luis Date: Tue, 10 Mar 2026 11:19:03 -0300 X-Gm-Features: AaiRm52rB78NvLmu1SY7qnJzPWuS6VP7FOUVnHzkjIfEZ3OyoHlFfvQALaF5Xeo Message-ID: Subject: Re: [PATCH v4 0/6] GDB: aarch64-linux: Some header fixes To: Thiago Jung Bauermann Cc: Simon Marchi , gdb-patches@sourceware.org, Chris Packham , Tom Tromey , sunilkumar.dora@windriver.com Content-Type: multipart/alternative; boundary="000000000000371203064cac34ac" X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org --000000000000371203064cac34ac Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks. I think v4 is good. On Wed, Mar 4, 2026, 00:52 Thiago Jung Bauermann < thiago.bauermann@linaro.org> wrote: > Hello Simon, > > Simon Marchi writes: > > > On 2026-03-03 00:06, Thiago Jung Bauermann wrote: > >> v4 adds two new patches, reorganizing MTE and SME definitions. > >> > >> With this series, I think the AArch64 definitions are correctly > organized > >> between the headers in gdb/arch/ and gdb/nat/. > >> > >> if the series is approved I will propose a version of the last patch f= or > >> the GDB 17 branch which doesn't depend on the previous patches, so tha= t > the > >> build failure on aarch64-linux-musl can be fixed with minimal changes. > >> > >> I didn't include Luis' Approved-by to patches, since they have some > changes > >> in them. > >> > >> I also build-tested this version on aarch64-freebsd14.3 in addition to > >> aarch64-linux-gnu and aarch64-linux-musl. > >> > >> Previous versions of the patches: > >> > >> v1: > https://inbox.sourceware.org/gdb-patches/20260211045853.1436881-1-thiago.= bauermann@linaro.org/ > >> v2: > https://inbox.sourceware.org/gdb-patches/20260214045504.361392-1-thiago.b= auermann@linaro.org/ > >> v3: > https://inbox.sourceware.org/gdb-patches/20260217060106.1906312-1-thiago.= bauermann@linaro.org/ > > > > I skimmed the code and read the commit messages, it looks good to me, > > but I will leave Luis give the approval. Thanks for the cleanup, I > > think things are organized in a systematic and predictable way now. > > Thanks! and thank you for the prompt review. > > > Here are some things that copilot had to say, I checked and they seemed > > true: > > They are true indeed. > > > - gdb/nat/aarch64-pauth-linux.h: HWCAP_PACA is defined unconditionally= , > > unlike every other HWCAP fallback in the series (HWCAP2_MTE, > > HWCAP2_FPMR, HWCAP2_SME, HWCAP_GCS) which all use #ifndef guards. On > > any modern aarch64 Linux system HWCAP_PACA is already defined by > > , so including this header after any header that pulls > > it in will cause a redefinition error. Wrap it in #ifndef HWCAP_PACA > > / #endif. > > Ah, I missed that. Fixed locally. > > > (Simon: not sure it will necessarily be a error, I think it's > possible to > > redefine macros if they have exactly the same value, but still it > > would be good to add the #ifndef.) > > I tested and you are correct. There's a build error only if the > definitions differ. > > In the process of testing this, I noticed that the #ifndef implies that > is included, so I amended the nat/*.h files that define > HWCAP macros to also include it explicitly. And also in > the case of one header which defines a couple of ptrace constants. I'll > detail it in the respective patches. > > > - FPMR: the commit message appears to be a copy-paste of the pauth one > > that wasn't updated =E2=80=94 it references AARCH64_HWCAP2_FPRM, HWC= AP2_FPRM, > > and gdb/arch/aarch64-pauth-linux.h / gdb/nat/aarch64-pauth-linux.h, > > when all four should refer to the FPMR variants. > > Argh. Fixed. > > > (Simon: notice the FPRM -> FPMR typos in there) > > Argh again. Fixed again. > > > - GCS: the commit message says "create > > gdb/nat/aarch64-gcs-linux-ptrace.h" but the file actually created is > > gdb/nat/aarch64-gcs-linux.h. > > Yes, I originally called the file ...-ptrace.h but then I changed my > mind and forgot to adjust the commit message. Fixed. > > -- > Thiago > --000000000000371203064cac34ac Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks. I think v4 is good.

On Wed, = Mar 4, 2026, 00:52 Thiago Jung Bauermann <thiago.bauermann@linaro.org> wrote:
Hello Simon,

Simon Marchi <simark@simark.ca> writes:

> On 2026-03-03 00:06, Thiago Jung Bauermann wrote:
>> v4 adds two new patches, reorganizing MTE and SME definitions.
>>
>> With this series, I think the AArch64 definitions are correctly or= ganized
>> between the headers in gdb/arch/ and gdb/nat/.
>>
>> if the series is approved I will propose a version of the last pat= ch for
>> the GDB 17 branch which doesn't depend on the previous patches= , so that the
>> build failure on aarch64-linux-musl can be fixed with minimal chan= ges.
>>
>> I didn't include Luis' Approved-by to patches, since they = have some changes
>> in them.
>>
>> I also build-tested this version on aarch64-freebsd14.3 in additio= n to
>> aarch64-linux-gnu and aarch64-linux-musl.
>>
>> Previous versions of the patches:
>>
>> v1: https://inbox.sourceware.org/gdb-patches/20260211045853.1= 436881-1-thiago.bauermann@linaro.org/
>> v2: https://inbox.sourceware.org/gdb-patches/20260214045504.36= 1392-1-thiago.bauermann@linaro.org/
>> v3: https://inbox.sourceware.org/gdb-patches/20260217060106.1= 906312-1-thiago.bauermann@linaro.org/
>
> I skimmed the code and read the commit messages, it looks good to me,<= br> > but I will leave Luis give the approval.=C2=A0 Thanks for the cleanup,= I
> think things are organized in a systematic and predictable way now.
Thanks! and thank you for the prompt review.

> Here are some things that copilot had to say, I checked and they seeme= d
> true:

They are true indeed.

>=C2=A0 - gdb/nat/aarch64-pauth-linux.h: HWCAP_PACA is defined unconditi= onally,
>=C2=A0 =C2=A0 unlike every other HWCAP fallback in the series (HWCAP2_M= TE,
>=C2=A0 =C2=A0 HWCAP2_FPMR, HWCAP2_SME, HWCAP_GCS) which all use #ifndef= guards. On
>=C2=A0 =C2=A0 any modern aarch64 Linux system HWCAP_PACA is already def= ined by
>=C2=A0 =C2=A0 <asm/hwcap.h>, so including this header after any h= eader that pulls
>=C2=A0 =C2=A0 it in will cause a redefinition error. Wrap it in #ifndef= HWCAP_PACA
>=C2=A0 =C2=A0 / #endif.

Ah, I missed that. Fixed locally.

>=C2=A0 =C2=A0 (Simon: not sure it will necessarily be a error, I think = it's possible to
>=C2=A0 =C2=A0 redefine macros if they have exactly the same value, but = still it
>=C2=A0 =C2=A0 would be good to add the #ifndef.)

I tested and you are correct. There's a build error only if the
definitions differ.

In the process of testing this, I noticed that the #ifndef implies that
<asm/hwcap.h> is included, so I amended the nat/*.h files that define=
HWCAP macros to also include it explicitly. And also <asm/ptrace.h> i= n
the case of one header which defines a couple of ptrace constants. I'll=
detail it in the respective patches.

>=C2=A0 - FPMR: the commit message appears to be a copy-paste of the pau= th one
>=C2=A0 =C2=A0 that wasn't updated =E2=80=94 it references AARCH64_H= WCAP2_FPRM, HWCAP2_FPRM,
>=C2=A0 =C2=A0 and gdb/arch/aarch64-pauth-linux.h / gdb/nat/aarch64-paut= h-linux.h,
>=C2=A0 =C2=A0 when all four should refer to the FPMR variants.

Argh. Fixed.

>=C2=A0 =C2=A0 (Simon: notice the FPRM -> FPMR typos in there)

Argh again. Fixed again.

>=C2=A0 - GCS: the commit message says "create
>=C2=A0 =C2=A0 gdb/nat/aarch64-gcs-linux-ptrace.h" but the file act= ually created is
>=C2=A0 =C2=A0 gdb/nat/aarch64-gcs-linux.h.

Yes, I originally called the file ...-ptrace.h but then I changed my
mind and forgot to adjust the commit message. Fixed.

--
Thiago
--000000000000371203064cac34ac--