From: Simon Marchi <simark@simark.ca>
To: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Cc: gdb-patches@sourceware.org,
Chris Packham <judge.packham@gmail.com>,
Luis <luis.machado.foss@gmail.com>, Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH v2 1/2] GDB: aarch64-linux: Reorganize gdb/arch/aarch64-gcs-linux.h
Date: Tue, 17 Feb 2026 10:35:09 -0500 [thread overview]
Message-ID: <b6f73a23-2201-46c6-adfb-43910bd1c4b7@simark.ca> (raw)
In-Reply-To: <87ldgsx8dc.fsf@linaro.org>
On 2026-02-17 00:10, Thiago Jung Bauermann wrote:
> Simon Marchi <simark@simark.ca> writes:
>
>>> diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c
>>> index 028de981588b..b2dd192a7b56 100644
>>> --- a/gdb/aarch64-linux-nat.c
>>> +++ b/gdb/aarch64-linux-nat.c
>>> @@ -51,7 +51,7 @@
>>> #include "gdb_proc_service.h"
>>> #include "arch-utils.h"
>>>
>>> -#include "arch/aarch64-gcs-linux.h"
>>> +#include "arch/aarch64-linux.h"
>>> #include "arch/aarch64-mte-linux.h"
>>>
>>> #include "nat/aarch64-mte-linux-ptrace.h"
>>> @@ -1013,7 +1013,7 @@ aarch64_linux_nat_target::read_description ()
>>> active or not. */
>>> features.vq = aarch64_sve_get_vq (tid);
>>> features.pauth = hwcap & AARCH64_HWCAP_PACA;
>>> - features.gcs = features.gcs_linux = hwcap & HWCAP_GCS;
>>
>> This one could stay HWCAP_GCS, but I don't have a preference.
>
> Luis prefers keeping it as HWCAP_GCS (and also renaming
> AARCH64_HWCAP_PACA to HWCAP_PACA), so that's what I'm doing for v3.
>
>> If we want to ensure / prove they are the same, we could add asserts
>> like this in the nat/ header:
>>
>> static_assert (AARCH64_HWCAP_GCS == HWCAP_GCS);
>>
>> That assert would only be checked when compiling natively for an aarch64
>> system (where HWCAP_GCS is available), but it's better than nothing.
>
> I mentioned this concern mostly for completeness, TBH. IMO it's not
> worth adding this assert unless we're actually bitten by this problem
> (which AFAIK hasn't happened yet).
I wouldn't expect it to really catch mistakes, it would be more for
self-documentation.
Simon
next prev parent reply other threads:[~2026-02-17 15:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-14 4:54 [PATCH v2 0/2] GDB: aarch64-linux: Some header fixes Thiago Jung Bauermann
2026-02-14 4:54 ` [PATCH v2 1/2] GDB: aarch64-linux: Reorganize gdb/arch/aarch64-gcs-linux.h Thiago Jung Bauermann
2026-02-14 9:38 ` Luis
2026-02-17 5:21 ` Thiago Jung Bauermann
2026-02-14 14:29 ` Simon Marchi
2026-02-17 5:10 ` Thiago Jung Bauermann
2026-02-17 15:35 ` Simon Marchi [this message]
2026-02-14 4:54 ` [PATCH v2 2/2] GDB: aarch64-linux: Fix build failure on musl systems Thiago Jung Bauermann
2026-02-14 14:30 ` [PATCH v2 0/2] GDB: aarch64-linux: Some header fixes Simon Marchi
2026-02-17 5:11 ` Thiago Jung Bauermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b6f73a23-2201-46c6-adfb-43910bd1c4b7@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=judge.packham@gmail.com \
--cc=luis.machado.foss@gmail.com \
--cc=thiago.bauermann@linaro.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox