Re: [PATCH v4 3/6] GDB: aarch64-linux: Reorganize MTE-related definitions

Luis
2026-03-10T14:15:56Z

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

Thanks.

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

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

> Thiago Jung Bauermann <thiago.bauermann@linaro.org> writes:
>
> > diff --git a/gdb/nat/aarch64-mte-linux-ptrace.h
> b/gdb/nat/aarch64-mte-linux-ptrace.h
> > index d31fa9f3c071..653de33108c8 100644
> > --- a/gdb/nat/aarch64-mte-linux-ptrace.h
> > +++ b/gdb/nat/aarch64-mte-linux-ptrace.h
> > @@ -20,6 +20,11 @@
> > #ifndef GDB_NAT_AARCH64_MTE_LINUX_PTRACE_H
> > #define GDB_NAT_AARCH64_MTE_LINUX_PTRACE_H
> >
> > +/* Feature check for Memory Tagging Extension. */
> > +#ifndef HWCAP2_MTE
> > +#define HWCAP2_MTE (1 << 18)
> > +#endif
> > +
> > /* MTE allocation tag access */
> >
> > #ifndef PTRACE_PEEKMTETAGS
>
> As with the previous patches, I locally amended this one to also include
> <asm/hwcap.h>. And since this header also defines some ptrace constants,
> also include <asm/ptrace.h>:
>
> diff --git a/gdb/nat/aarch64-mte-linux-ptrace.h
> b/gdb/nat/aarch64-mte-linux-ptrace.h
> index 653de33108c8..7d1e7c1960d1 100644
> --- a/gdb/nat/aarch64-mte-linux-ptrace.h
> +++ b/gdb/nat/aarch64-mte-linux-ptrace.h
> @@ -20,6 +20,9 @@
> #ifndef GDB_NAT_AARCH64_MTE_LINUX_PTRACE_H
> #define GDB_NAT_AARCH64_MTE_LINUX_PTRACE_H
>
> +#include <asm/hwcap.h>
> +#include <asm/ptrace.h>
> +
> /* Feature check for Memory Tagging Extension. */
> #ifndef HWCAP2_MTE
> #define HWCAP2_MTE (1 << 18)
>
> --
> Thiago
>

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