Re: [PATCH v4 1/6] GDB: Add aarch64-pauth-linux.h to gdb/arch/ and gdb/nat/

Luis
2026-03-10T14:19:10Z

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

Thanks.

Unless Simon wants the points he made fixed...

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

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

> Simon Marchi <simark@simark.ca> writes:
>
> >> diff --git a/gdbserver/linux-aarch64-low.cc
> b/gdbserver/linux-aarch64-low.cc
> >> index b19e605f55d6..07ddfb324466 100644
> >> --- a/gdbserver/linux-aarch64-low.cc
> >> +++ b/gdbserver/linux-aarch64-low.cc
> >> @@ -22,6 +22,7 @@
> >> #include "linux-low.h"
> >> #include "nat/aarch64-linux.h"
> >> #include "nat/aarch64-linux-hw-point.h"
> >> +#include "nat/aarch64-pauth-linux.h"
> >> #include "arch/aarch64-insn.h"
> >> #include "linux-aarch32-low.h"
> >> #include "elf/common.h"
> >> @@ -41,6 +42,7 @@
> >> #include "arch/aarch64.h"
> >> #include "arch/aarch64-gcs-linux.h"
> >> #include "arch/aarch64-mte-linux.h"
> >> +#include "arch/aarch64-pauth-linux.h"
> >> #include "arch/aarch64-scalable-linux.h"
> >> #include "linux-aarch32-tdesc.h"
> >> #include "linux-aarch64-tdesc.h"
> >> @@ -952,7 +954,7 @@ aarch64_adjust_register_sets (const struct
> aarch64_features &features)
> >> break;
> >> case NT_ARM_PAC_MASK:
> >> if (features.pauth)
> >> - regset->size = AARCH64_PAUTH_REGS_SIZE;
> >> + regset->size = AARCH64_LINUX_SIZEOF_PAUTH;
> >
> > It's not a deal-breaker for this patch series, but I'm just wondering:
> > is there some "native" thing, provided by Linux, that could give us the
> > size here, like sizeof(some_type)? If we're trying to use the native
> > stuff in the native files, then for consistency it would be nice to
> > avoid relying on our own definition of the sizeof pauth.
>
> There's struct user_pac_mask in <asm/ptrace.h> so we could do
> sizeof (user_pac_mask), but to allow using older system headers that would
> require a configure test as done in patch 6 of this series, and add our
> own definition of the struct in case the system headers don't have it.
>
> I can do that as a separate patch if you think it's better.
>
> --
> Thiago
>

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