Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Matthieu Longo <matthieu.longo@arm.com>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Cc: Luis Machado <luis.machado@amd.com>,
	Luis Machado <luis.machado.foss@gmail.com>,
	Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Subject: Re: [PATCH v1] gdb/linux: add helpers to read AT_HWCAP3 and AT_HWCAP4
Date: Mon, 24 Aug 2026 15:06:42 +0100	[thread overview]
Message-ID: <150dddca-5598-4eb4-be51-3bea3a4a1516@arm.com> (raw)
In-Reply-To: <1646ac0a-b433-4bb3-9800-efef38d6f1d9@simark.ca>

On 20/08/2026 15:29, Simon Marchi wrote:
> On 7/27/26 1:28 PM, Matthieu Longo wrote:
>> Add linux_get_hwcap3 and linux_get_hwcap4 helpers to GDB and gdbserver,
>> mirroring the existing linux_get_hwcap and linux_get_hwcap2 interfaces.
>>
>> The new helpers retrieve the AT_HWCAP3 and AT_HWCAP4 auxiliary vector
>> entry either from explicitly supplied auxv data or from the current
>> inferior.
>>
>> This prepares for future features that depend on HWCAP3 and HWCAP4
>> capability bits.
>>
>> Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
> 
> LGTM
> 
> Approved-By: Simon Marchi <simon.marchi@efficios.com>
> 

Thanks !

> But one question that picked my curiosity:
> 
>> diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
>> index f1be62225e2..c4daba0bf40 100644
>> --- a/gdbserver/linux-low.cc
>> +++ b/gdbserver/linux-low.cc
>> @@ -70,6 +70,14 @@
>>  #define AT_HWCAP2 26
>>  #endif
>>  
>> +#ifndef AT_HWCAP3
>> +#define AT_HWCAP3 29
>> +#endif
>> +
>> +#ifndef AT_HWCAP4
>> +#define AT_HWCAP4 30
>> +#endif
> 
> How come we need to provide these values in gdbserver, but not in the
> equivalent native part of gdb?
> 
> Simon

Those values had already been added in elf/common.h by this patch:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0c90306549b02dd2b07fe3f2639ab3ac75a29558

Matthieu


      reply	other threads:[~2026-08-24 14:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27 17:28 Matthieu Longo
2026-08-20 11:07 ` Matthieu Longo
2026-08-20 14:29 ` Simon Marchi
2026-08-24 14:06   ` Matthieu Longo [this message]

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=150dddca-5598-4eb4-be51-3bea3a4a1516@arm.com \
    --to=matthieu.longo@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=luis.machado.foss@gmail.com \
    --cc=luis.machado@amd.com \
    --cc=simark@simark.ca \
    --cc=thiago.bauermann@linaro.org \
    /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