Re: [PATCH v1] gdb/linux: add helpers to read AT_HWCAP3 and AT_HWCAP4
Matthieu Longo <[email protected]>
| Newsgroups | gmane.comp.gdb.patches |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> > > LGTM > > Approved-By: Simon Marchi <[email protected]> > 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