mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
6dc0ebde59
Pointer Authentication is a new feature in AArch64 v8.3-a. When enabled in the compiler, function return addresses will be mangled by the kernel. Add register description xml and wire up to aarch64_linux_read_description. This description includes the two pauth user registers. Nothing yet uses the feature - that is added in later patches. gdb/ChangeLog: * aarch64-linux-nat.c (aarch64_linux_nat_target::read_description): Add pauth param. * aarch64-linux-tdep.c (aarch64_linux_core_read_description): Likewise. * aarch64-tdep.c (struct target_desc): Add in pauth. (aarch64_read_description): Add pauth param. (aarch64_gdbarch_init): Likewise. * aarch64-tdep.h (aarch64_read_description): Likewise. * arch/aarch64.c (aarch64_create_target_description): Likewise. * arch/aarch64.h (aarch64_create_target_description): Likewise. * features/Makefile: Add new files. * features/aarch64-pauth.c: New file. * features/aarch64-pauth.xml: New file. gdb/doc/ChangeLog: * gdb.texinfo: Describe pauth feature. gdb/gdbserver/ChangeLog: * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param. (initialize_low_tracepoint): Likewise. * linux-aarch64-low.c (aarch64_arch_setup): Likewise. * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise. * linux-aarch64-tdesc.c (struct target_desc): Likewise. (aarch64_linux_read_description): Likewise. * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
52 lines
1.5 KiB
C
52 lines
1.5 KiB
C
/* Copyright (C) 2017-2019 Free Software Foundation, Inc.
|
|
|
|
This file is part of GDB.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#include "common/common-defs.h"
|
|
#include "aarch64.h"
|
|
#include <stdlib.h>
|
|
|
|
#include "../features/aarch64-core.c"
|
|
#include "../features/aarch64-fpu.c"
|
|
#include "../features/aarch64-sve.c"
|
|
#include "../features/aarch64-pauth.c"
|
|
|
|
/* See arch/aarch64.h. */
|
|
|
|
target_desc *
|
|
aarch64_create_target_description (uint64_t vq, bool pauth_p)
|
|
{
|
|
target_desc *tdesc = allocate_target_description ();
|
|
|
|
#ifndef IN_PROCESS_AGENT
|
|
set_tdesc_architecture (tdesc, "aarch64");
|
|
#endif
|
|
|
|
long regnum = 0;
|
|
|
|
regnum = create_feature_aarch64_core (tdesc, regnum);
|
|
|
|
if (vq == 0)
|
|
regnum = create_feature_aarch64_fpu (tdesc, regnum);
|
|
else
|
|
regnum = create_feature_aarch64_sve (tdesc, regnum, vq);
|
|
|
|
if (pauth_p)
|
|
regnum = create_feature_aarch64_pauth (tdesc, regnum);
|
|
|
|
return tdesc;
|
|
}
|