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

Simon Marchi
2026-03-03T15:51:57Z

> 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.

Simon