mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-26 10:43:31 +08:00
0f83012ea0
Tidy up calls to read HWCAP (and HWCAP2) by adding common functions, removing the PPC and AArch64 specific versions. The only function difference is in aarch64_linux_core_read_description - if the hwcap read fails it now return a valid description instead of nullptr. gdb/ChangeLog: 2019-03-25 Alan Hayward <alan.hayward@arm.com> * aarch64-linux-nat.c (aarch64_linux_nat_target::read_description): Call linux_get_hwcap. * aarch64-linux-tdep.c (aarch64_linux_core_read_description): Likewise. (aarch64_linux_get_hwcap): Remove function. * aarch64-linux-tdep.h (aarch64_linux_get_hwcap): Remove declaration. * arm-linux-nat.c (arm_linux_nat_target::read_description):Call linux_get_hwcap. * arm-linux-tdep.c (arm_linux_core_read_description): Likewise. * linux-tdep.c (linux_get_hwcap): Add function. (linux_get_hwcap2): Likewise. * linux-tdep.h (linux_get_hwcap): Add declaration. (linux_get_hwcap2): Likewise. * ppc-linux-nat.c (ppc_linux_get_hwcap): Remove function. (ppc_linux_get_hwcap2): Likewise. (ppc_linux_nat_target::region_ok_for_hw_watchpoint): Call linux_get_hwcap. (ppc_linux_nat_target::insert_watchpoint): Likewise. (ppc_linux_nat_target::watchpoint_addr_within_range): Likewise. (ppc_linux_nat_target::read_description): Likewise. * ppc-linux-tdep.c (ppc_linux_core_read_description): Likewise. * s390-linux-nat.c: Likewise. * s390-linux-tdep.c (s390_core_read_description): Likewise.
46 lines
1.7 KiB
C
46 lines
1.7 KiB
C
/* GNU/Linux on AArch64 target support, prototypes.
|
|
|
|
Copyright (C) 2012-2019 Free Software Foundation, Inc.
|
|
Contributed by ARM Ltd.
|
|
|
|
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/>. */
|
|
|
|
#ifndef AARCH64_LINUX_TDEP_H
|
|
#define AARCH64_LINUX_TDEP_H
|
|
|
|
#include "regset.h"
|
|
|
|
/* The general-purpose regset consists of 31 X registers, plus SP, PC,
|
|
and PSTATE registers, as defined in the AArch64 port of the Linux
|
|
kernel. */
|
|
#define AARCH64_LINUX_SIZEOF_GREGSET (34 * X_REGISTER_SIZE)
|
|
|
|
/* The fp regset consists of 32 V registers, plus FPCR and FPSR which
|
|
are 4 bytes wide each, and the whole structure is padded to 128 bit
|
|
alignment. */
|
|
#define AARCH64_LINUX_SIZEOF_FPREGSET (33 * V_REGISTER_SIZE)
|
|
|
|
/* The pauth regset consists of 2 X sized registers. */
|
|
#define AARCH64_LINUX_SIZEOF_PAUTH (2 * X_REGISTER_SIZE)
|
|
|
|
extern const struct regset aarch64_linux_gregset;
|
|
extern const struct regset aarch64_linux_fpregset;
|
|
|
|
/* Matches HWCAP_PACA in kernel header arch/arm64/include/uapi/asm/hwcap.h. */
|
|
#define AARCH64_HWCAP_PACA (1 << 30)
|
|
|
|
#endif /* AARCH64_LINUX_TDEP_H */
|