Re: [PATCH v4 4/6] GDB: aarch64-linux: Reorganize SME-related definitions

Luis
2026-03-10T14:09:20Z

[-- Attachment #1: Type: text/plain, Size: 1700 bytes --]

Thanks.

Approved-By: Luis Machado <luis.machado.foss@gmail.com>

On Wed, Mar 4, 2026, 01:21 Thiago Jung Bauermann <
thiago.bauermann@linaro.org> wrote:

> Thiago Jung Bauermann <thiago.bauermann@linaro.org> writes:
>
> > diff --git a/gdb/nat/aarch64-scalable-linux-ptrace.h
> b/gdb/nat/aarch64-scalable-linux-ptrace.h
> > index 453f19dfe8d9..f3424baf7092 100644
> > --- a/gdb/nat/aarch64-scalable-linux-ptrace.h
> > +++ b/gdb/nat/aarch64-scalable-linux-ptrace.h
> > @@ -34,6 +34,17 @@
> > #include <stdarg.h>
> > #include "aarch64-scalable-linux-sigcontext.h"
> >
> > +/* Feature check for Scalable Matrix Extension. */
> > +#ifndef HWCAP2_SME
> > +#define HWCAP2_SME (1 << 23)
> > +#endif
> > +
> > +/* Feature check for Scalable Matrix Extension 2. */
> > +#ifndef HWCAP2_SME2
> > +#define HWCAP2_SME2 (1UL << 37)
> > +#define HWCAP2_SME2P1 (1UL << 38)
> > +#endif
> > +
> > /* Indicates whether a SVE ptrace header is followed by SVE registers
> or a
> > fpsimd structure. */
> > #define HAS_SVE_STATE(header) ((header).flags & SVE_PT_REGS_SVE)
>
> As with the other patches, I amended this one locally with:
>
> diff --git a/gdb/nat/aarch64-scalable-linux-ptrace.h
> b/gdb/nat/aarch64-scalable-linux-ptrace.h
> index f3424baf7092..357154751508 100644
> --- a/gdb/nat/aarch64-scalable-linux-ptrace.h
> +++ b/gdb/nat/aarch64-scalable-linux-ptrace.h
> @@ -30,6 +30,7 @@
> these very same symbols. When that's the case, build errors will
> result when <asm/ptrace.h> is included before <sys/ptrace.h>. */
> #include <sys/ptrace.h>
> +#include <asm/hwcap.h>
> #include <asm/ptrace.h>
> #include <stdarg.h>
> #include "aarch64-scalable-linux-sigcontext.h"
>
> --
> Thiago
>

[-- Attachment #2: Type: text/html, Size: 2481 bytes --]