[PATCH v4 0/6] GDB: aarch64-linux: Some header fixes

Thiago Jung Bauermann
2026-03-03T05:07:28Z

v4 adds two new patches, reorganizing MTE and SME definitions.

With this series, I think the AArch64 definitions are correctly organized
between the headers in gdb/arch/ and gdb/nat/.

if the series is approved I will propose a version of the last patch for
the GDB 17 branch which doesn't depend on the previous patches, so that the
build failure on aarch64-linux-musl can be fixed with minimal changes.

I didn't include Luis' Approved-by to patches, since they have some changes
in them.

I also build-tested this version on aarch64-freebsd14.3 in addition to
aarch64-linux-gnu and aarch64-linux-musl.

Previous versions of the patches:

v1: https://inbox.sourceware.org/gdb-patches/20260211045853.1436881-1-thiago.bauermann@linaro.org/
v2: https://inbox.sourceware.org/gdb-patches/20260214045504.361392-1-thiago.bauermann@linaro.org/
v3: https://inbox.sourceware.org/gdb-patches/20260217060106.1906312-1-thiago.bauermann@linaro.org/

Thiago Jung Bauermann (6):
GDB: Add aarch64-pauth-linux.h to gdb/arch/ and gdb/nat/
GDB: Add aarch64-fpmr-linux.h to gdb/arch/ and gdb/nat/
GDB: aarch64-linux: Reorganize MTE-related definitions
GDB: aarch64-linux: Reorganize SME-related definitions
GDB: aarch64-linux: Reorganize GCS-related definitions
GDB: aarch64-linux: Fix build failure on musl systems

gdb/Makefile.in | 5 +++
gdb/aarch64-linux-nat.c | 12 +++----
gdb/aarch64-linux-tdep.c | 23 +++++++------
gdb/aarch64-linux-tdep.h | 9 -----
gdb/arch/aarch64-fpmr-linux.h | 26 +++++++++++++++
gdb/arch/aarch64-gcs-linux.h | 24 +++++---------
gdb/arch/aarch64-mte-linux.h | 23 +++----------
gdb/arch/aarch64-pauth-linux.h | 29 ++++++++++++++++
gdb/arch/aarch64-scalable-linux.h | 11 -------
gdb/arch/aarch64.h | 8 -----
gdb/linux-tdep.h | 11 -------
gdb/nat/aarch64-fpmr-linux.h | 28 ++++++++++++++++
gdb/nat/aarch64-gcs-linux.h | 44 +++++++++++++++++++++++++
gdb/nat/aarch64-mte-linux-ptrace.c | 1 -
gdb/nat/aarch64-mte-linux-ptrace.h | 14 ++++++++
gdb/nat/aarch64-pauth-linux.h | 26 +++++++++++++++
gdb/nat/aarch64-scalable-linux-ptrace.h | 11 +++++++
gdbserver/linux-aarch64-low.cc | 15 ++++-----
gdbsupport/config.in | 3 ++
gdbsupport/configure | 36 ++++++++++++++++++++
gdbsupport/configure.ac | 19 +++++++++++
21 files changed, 278 insertions(+), 100 deletions(-)
create mode 100644 gdb/arch/aarch64-fpmr-linux.h
create mode 100644 gdb/arch/aarch64-pauth-linux.h
create mode 100644 gdb/nat/aarch64-fpmr-linux.h
create mode 100644 gdb/nat/aarch64-gcs-linux.h
create mode 100644 gdb/nat/aarch64-pauth-linux.h