From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yd2ZAcUnsGnzuyEAWB0awg (envelope-from ) for ; Tue, 10 Mar 2026 10:16:37 -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=XL6cFEjN; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 01BA21E0DD; Tue, 10 Mar 2026 10:16:36 -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 4EDF21E08D for ; Tue, 10 Mar 2026 10:16:36 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 65D194B9DB44 for ; Tue, 10 Mar 2026 14:16:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 65D194B9DB44 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=XL6cFEjN Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) by sourceware.org (Postfix) with ESMTPS id AA53C4B9DB64 for ; Tue, 10 Mar 2026 14:14:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AA53C4B9DB64 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 AA53C4B9DB64 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2001:4860:4864:20::29 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1773152069; cv=pass; b=MA63SXK2E3IKmSl+NtglsGGsw4ZNUcSHmnf5sUnmr2Ew12eDYbYar8V1iEuRaOhEy3K2bV9kP80MEaILR3nOpGJVQf+G+a06q7eFX9xGsI0IvpO2rTkaIDicwODFMM0/ntQVDawqtV2IHzVsZ/tdWFj9xdhNnHp2AN88TJLxxlE= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1773152069; c=relaxed/simple; bh=R0dif3YyFSlJ/mKmeqbf96Laf0ye7AJ9w2Lca/AQ7YA=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=HwvO7Vlrbk/wHOVJ+0/a2qTbyzl48el3JB+8Te77qVHZKLTg98AChNIamgbpUcLulEqq5Bpz0t0yjzBEUKsqI2xmW0aHmeJdvCdydw5NOAhmAlYIJ0cqYCdPEUuJQQ1303L0E5kAdeRpYkP0c77ejwQnGR5FnYExR+dIJZGyl2w= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA53C4B9DB64 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-41576c5c01cso4931214fac.3 for ; Tue, 10 Mar 2026 07:14:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773152064; cv=none; d=google.com; s=arc-20240605; b=jqAgb3z15AE42NU3U46uYAcl1Busu6SQYR0tICYSJ7KcNkGOrbGgyoK8SEKt/Mrj4o wayoYhKwe1ofCLAQrr+z1oymcYAk4K43YsKrU+C/l+rUOc5XWjFpi/uGYr3VVulJqTpa /OdAPvBvG2cfrQzIgBjPu19K1EZczRzb7B3HroKRM/1xxgXPTjHwl0vFq0xhbLRBmD2Y tT8Lg7v+gNJOV3Z3RyuBvVeYh/zHz4ubD6En5B6piGLqrRBEpnpRMKSwEepG1a5FIFLl Ji50eeJZlcKzeCHHIlMrVUyPvYZykbGHHNwJiqwmVUH0Noim0LLyv8btXiL9eBQSyCk8 Ylcw== 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=ZN1/a/hA1+iudizEjiD/G6pg+fOVRvx3U4IkTS9XqSI=; fh=fjfPYQfMhWEU5kxyRFb+iB2y8yPz633xsUnVQoxbtAE=; b=V4IF8MFUUcuP1OdvAWPzh3Zie0961DUN0Egaw4K7kmCdojP0IT9n3pGn8TfHKaZgMy kjjfnwkOf6uf9yXph5sTjsywwhKBVvqmyWave1DSaV7dqsUg9mHqrUjEjw3lZScRuOYk 5gp9mdTMeeLiCKW54jtIdasSu8PKptNMmOQXhelmYYju5ZNYWVT1ARM5YX0VkD0pgvoA RMLqGdaYFEVZWJrwasvh51BT3ClkhgDwkj/bu11cEvHPQyV+tYuqlCcuT+iBVjZkn8Tb Ntn/i7dpGmd29THBuBAwiZxQ/TYGRTjL9E1gBMZUWi3atSd2a3/6dP7YAbtTnayyuSiS maGA==; 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=1773152064; x=1773756864; 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=ZN1/a/hA1+iudizEjiD/G6pg+fOVRvx3U4IkTS9XqSI=; b=XL6cFEjNikVg0nNCZJEQpt7FOttRNxWjFAH5YOY6aihW/LfkepXw5p8WiUVXvfToD4 vr6hCZ2tZIuGmiNhoWKMP0rB3tr6eB91v2Gpj8PMFfUjijJgXRXMTEFrpSCS6EqJY1Qz udDiXdOOhGlTI031OaTn+DFzA/f44KQwGlvKFnxBNzj+oQWBtCNy6TKM6UoDTkxhPCsq L7jmpsheibMTiowGj37YwQbaG6lQrvEP/0gl1zr3SuMtuc2uBDCPCoPOD3SWd+/mdRoz R4v0TLvdcfZAxYRWh6KvmFPEJP1JCO9x6JVlMX1GVUAdHxmKhijcFA5YucFRSFQM1RPZ BWFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773152064; x=1773756864; 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=ZN1/a/hA1+iudizEjiD/G6pg+fOVRvx3U4IkTS9XqSI=; b=qaVdvYWj30oU5KBSj/DPfsRtw99OvLN/xu/zxlLePwydHsY0VD+TwrepYSDRwhMMCK aDs9xsLbZpLyPhDxLD2mhdj/7gBPP+PILgWoBfMlWGO1DlZWDh3E1r2OJ1MmaWrXbOEp I/lvdiY+sH61zaXQf926bMEEaCEftRsKSR7gFd0ticG0Y513Qh6rrpcWFKLKfySNR+1o mDULNm2aerjf2rL7No67MphNnB8xUAX0t7oshpsZGfPCKIGWYROtlL5o7n1fNsf4yokU XJk/HvlS0RXlOvuhs2pDQMzNSLIErVYReHBqsK1lBO5VM0Igq6HAXXamPIFpNBE0j/Q+ tMlA== X-Gm-Message-State: AOJu0YxAyl0qs1oSToMUJyrabDEsvVDV/G7YW2/lAAbOvrUtUMQDrs7d 8C0US4FgfgtVCfKbUOG/8WSYYEx1kFuAZNkt+E6ibPSyJQ7M/xv8m2SpKfnQEgSl3NqwirMFqvU dkYH0tOqYMyyQRmrSSrSX/R+Rj1q9y3MayA== X-Gm-Gg: ATEYQzzKhmPyCeKqK+lGQ92IBYksvpY73+SZ3YyTG5CpgbgZeebcOHzDt3LWDHgy0p3 GhL/KWnSkP2jrLki5X4bt6kLn40Stmz4OnmEOVi8IpvIlRasS1NneCuJSalXmu0RrAcfGyWNujw /8m4pqvTCF96xW9d5NSfo72qN0wJOxcTq7TG/gr4LY0gS9F+QlXvV9UqPvGfvw1FeNWcAfjdPl9 fKKmz2o0rQtxm1ZdodzYH0uksGXKI+S3TrSYJp7lBGvzqhvE3T8lYAbeJ5MY7Q1YF4eKM6zTPLu ERLdHcUz/Erv/4cdn5VTmAP6ojJ5kX0czR4eVbs= X-Received: by 2002:a05:6871:6908:b0:417:5970:28ea with SMTP id 586e51a60fabf-41759706e3amr1944064fac.51.1773152063764; Tue, 10 Mar 2026 07:14:23 -0700 (PDT) MIME-Version: 1.0 References: <20260303050641.198127-1-thiago.bauermann@linaro.org> <20260303050641.198127-3-thiago.bauermann@linaro.org> <87a4wocjtm.fsf@linaro.org> In-Reply-To: <87a4wocjtm.fsf@linaro.org> From: Luis Date: Tue, 10 Mar 2026 11:14:12 -0300 X-Gm-Features: AaiRm53KDN51VACvmc52DC__BgC58fiye7Mt0zh6HgRX_0IJRRErd2xzmtMXEBw Message-ID: Subject: Re: [PATCH v4 2/6] GDB: Add aarch64-fpmr-linux.h to gdb/arch/ and gdb/nat/ To: Thiago Jung Bauermann Cc: gdb-patches@sourceware.org, Chris Packham , Tom Tromey , Simon Marchi , sunilkumar.dora@windriver.com Content-Type: multipart/alternative; boundary="000000000000e4be75064cac228b" 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 --000000000000e4be75064cac228b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks. Approved-By: Luis Machado On Wed, Mar 4, 2026, 01:14 Thiago Jung Bauermann < thiago.bauermann@linaro.org> wrote: > Thiago Jung Bauermann writes: > > > GDB conditionally defines HWCAP2_FPMR in gdb/arch/aarch64.h, but that's > > not the best place for it since it's a Linux-specific definition. > > > > Add new Linux- and feature-specific headers to contain it, one for > > target-dependent code and the other for native code. > > > > The target-dependant code should use AARCH64_HWCAP2_FPRM in > > gdb/arch/aarch64-pauth-linux.h while native code should use HWCAP2_FPRM= , > > which will hopefully be defined by the system headers but with a backup > > definition in gdb/nat/aarch64-pauth-linux.h if it isn't. > > > > Suggested-by: Luis > > Suggested-by: Simon Marchi > > Fixed locally these typos and pastos pointed out by Simon in the commit > message: > > - s/HWCAP2_FPRM/HWCAP2_FPMR/g > - aarch64-pauth-linux.h =E2=86=92 aarch64-fpmr-linux.h > > > diff --git a/gdb/nat/aarch64-fpmr-linux.h b/gdb/nat/aarch64-fpmr-linux.= h > > new file mode 100644 > > index 000000000000..bb0243a89396 > > --- /dev/null > > +++ b/gdb/nat/aarch64-fpmr-linux.h > > @@ -0,0 +1,28 @@ > > +/* Common Linux native definitions for AArch64 FPMR. > > + > > + Copyright (C) 2025-2026 Free Software Foundation, Inc. > > + > > + This file is part of GDB. > > + > > + This program is free software; you can redistribute it and/or modif= y > > + it under the terms of the GNU General Public License as published b= y > > + the Free Software Foundation; either version 3 of the License, or > > + (at your option) any later version. > > + > > + This program is distributed in the hope that it will be useful, > > + but WITHOUT ANY WARRANTY; without even the implied warranty of > > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > + GNU General Public License for more details. > > + > > + You should have received a copy of the GNU General Public License > > + along with this program. If not, see . > */ > > + > > +#ifndef GDB_NAT_AARCH64_FPMR_LINUX_H > > +#define GDB_NAT_AARCH64_FPMR_LINUX_H > > + > > +/* Feature check for Floating Point Mode Register. */ > > +#ifndef HWCAP2_FPMR > > +#define HWCAP2_FPMR (1ULL << 48) > > +#endif /* HWCAP2_FPMR */ > > + > > +#endif /* GDB_NAT_AARCH64_FPMR_LINUX_H */ > > As with the previous patch, I locally amended this one to also include > : > > diff --git a/gdb/nat/aarch64-fpmr-linux.h b/gdb/nat/aarch64-fpmr-linux.h > index bb0243a89396..9ed651d95059 100644 > --- a/gdb/nat/aarch64-fpmr-linux.h > +++ b/gdb/nat/aarch64-fpmr-linux.h > @@ -20,6 +20,8 @@ > #ifndef GDB_NAT_AARCH64_FPMR_LINUX_H > #define GDB_NAT_AARCH64_FPMR_LINUX_H > > +#include > + > /* Feature check for Floating Point Mode Register. */ > #ifndef HWCAP2_FPMR > #define HWCAP2_FPMR (1ULL << 48) > > -- > Thiago > --000000000000e4be75064cac228b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks.

Appr= oved-By: Luis Machado <lu= is.machado.foss@gmail.com>

On Wed, Mar 4,= 2026, 01:14 Thiago Jung Bauermann <thiago.bauermann@linaro.org> wrote:
Thiago Jung Bauermann <thiago.bauermann@lina= ro.org> writes:

> GDB conditionally defines HWCAP2_FPMR in gdb/arch/aarch64.h, but that&= #39;s
> not the best place for it since it's a Linux-specific definition.<= br> >
> Add new Linux- and feature-specific headers to contain it, one for
> target-dependent code and the other for native code.
>
> The target-dependant code should use AARCH64_HWCAP2_FPRM in
> gdb/arch/aarch64-pauth-linux.h while native code should use HWCAP2_FPR= M,
> which will hopefully be defined by the system headers but with a backu= p
> definition in gdb/nat/aarch64-pauth-linux.h if it isn't.
>
> Suggested-by: Luis <luis.machado.foss@gmail.com> > Suggested-by: Simon Marchi <simark@simark.ca>

Fixed locally these typos and pastos pointed out by Simon in the commit
message:

- s/HWCAP2_FPRM/HWCAP2_FPMR/g
- aarch64-pauth-linux.h =E2=86=92 aarch64-fpmr-linux.h

> diff --git a/gdb/nat/aarch64-fpmr-linux.h b/gdb/nat/aarch64-fpmr-linux= .h
> new file mode 100644
> index 000000000000..bb0243a89396
> --- /dev/null
> +++ b/gdb/nat/aarch64-fpmr-linux.h
> @@ -0,0 +1,28 @@
> +/* Common Linux native definitions for AArch64 FPMR.
> +
> +=C2=A0 =C2=A0Copyright (C) 2025-2026 Free Software Foundation, Inc. > +
> +=C2=A0 =C2=A0This file is part of GDB.
> +
> +=C2=A0 =C2=A0This program is free software; you can redistribute it a= nd/or modify
> +=C2=A0 =C2=A0it under the terms of the GNU General Public License as = published by
> +=C2=A0 =C2=A0the Free Software Foundation; either version 3 of the Li= cense, or
> +=C2=A0 =C2=A0(at your option) any later version.
> +
> +=C2=A0 =C2=A0This program is distributed in the hope that it will be = useful,
> +=C2=A0 =C2=A0but WITHOUT ANY WARRANTY; without even the implied warra= nty of
> +=C2=A0 =C2=A0MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.=C2= =A0 See the
> +=C2=A0 =C2=A0GNU General Public License for more details.
> +
> +=C2=A0 =C2=A0You should have received a copy of the GNU General Publi= c License
> +=C2=A0 =C2=A0along with this program.=C2=A0 If not, see <http://www.gnu.org/licenses/>.=C2=A0 */
> +
> +#ifndef GDB_NAT_AARCH64_FPMR_LINUX_H
> +#define GDB_NAT_AARCH64_FPMR_LINUX_H
> +
> +/* Feature check for Floating Point Mode Register.=C2=A0 */
> +#ifndef HWCAP2_FPMR
> +#define HWCAP2_FPMR (1ULL << 48)
> +#endif /* HWCAP2_FPMR */
> +
> +#endif /* GDB_NAT_AARCH64_FPMR_LINUX_H */

As with the previous patch, I locally amended this one to also include
<asm/hwcap.h>:

diff --git a/gdb/nat/aarch64-fpmr-linux.h b/gdb/nat/aarch64-fpmr-linux.h index bb0243a89396..9ed651d95059 100644
--- a/gdb/nat/aarch64-fpmr-linux.h
+++ b/gdb/nat/aarch64-fpmr-linux.h
@@ -20,6 +20,8 @@
=C2=A0#ifndef GDB_NAT_AARCH64_FPMR_LINUX_H
=C2=A0#define GDB_NAT_AARCH64_FPMR_LINUX_H

+#include <asm/hwcap.h>
+
=C2=A0/* Feature check for Floating Point Mode Register.=C2=A0 */
=C2=A0#ifndef HWCAP2_FPMR
=C2=A0#define HWCAP2_FPMR (1ULL << 48)

--
Thiago
--000000000000e4be75064cac228b--