This patch teach GDB to return the new ARMv8.3-A Pointer Authentication feature description when there is related support. * A new "pauth" feature description file is added. The new pointer authentication feature, "pauth", contains two virtual registers, "pauth_dmask" and "pauth_cmask". Their values are supplied by kernel to GDB through ptrace interface. They are masks to indicate which bits will be signature when data pointer or code pointer is signed. Those bits will be set to "1" in the mask. * HWCAP is used to detect whether the hardware support exists. Currently we only support return address signing with A key, so using ptrace trial read would not be reliable as it will return successfully when other keys are used inside kernel. The change on include/elf/common.h needs approval from Binutils maintainers. gdb/ 2017-08-09 Jiong Wang Yao Qi * aarch64-linux-nat.c (fetch_pauth_masks_from_thread): New function. (aarch64_linux_fetch_inferior_registers): Support pauth description. (aarch64_linux_read_description): Likewise. * aarch64-tdep.c: #include "features/aarch64-pauth.c". (aarch64_pauth_register_names): New register names array for pauth. (aarch64_cannot_store_register): New function. (aarch64_tdep_has_pauth_p): New function. (aarch64_gdbarch_init): Handle pauth description. Initialize the optional "regnum" field. Register cannot_store_register hook. (_initialize_aarch64_tdep): Call initialize_tdesc_aarch64_pauth. * aarch64-tdep.h (struct aarch64_optional_regnum): New structure type. (struct gdbarch_tdep) : New field. (tdesc_aarch64_pauth): New variable declaration. (aarch64_tdep_has_pauth_p): New function declaration. * nat/aarch64-linux.c: Include . (aarch64_host_hwcap): New function. * nat/aarch64-linux.h (HWCAP_APIA): New macro. (aarch64_host_hwcap): New function declaration. * features/Makefile (WHICH): Add aarch64-pauth. (XMLTOC): Add aarch64-pauth.xml. * features/aarch64-pauth-core.xml: New file. * features/aarch64-pauth.c: Generated. * features/aarch64-pauth.xml: New file. * regformats/aarch64-pauth.dat: Generated. include/ * elf/common.h (NT_ARM_PAC_MASK): New. gdb/doc/ * gdb.texinfo (AArch64 Features): New feature "org.gnu.gdb.aarch64.pauth".