Fix build for aarch64, arm, and riscv FreeBSD native targets.

Remove unused gdbarch argument to helper functions originally
copied from mips-fbsd-nat.c.  Include regcache.h previously
included from defs.h via gdbarch.h.

gdb/ChangeLog:

	* aarch64-fbsd-nat.c: Include regcache.h.
	(getregs_supplies, getfpregs_supplies): Remove unused gdbarch
	argument.
	(aarch64_fbsd_nat_target::fetch_registers)
	(aarch64_fbsd_nat_target::store_registers): Remove gdbarch
	variable.
	* arm-fbsd-nat.c, riscv-fbsd-nat.c: Likewise.
This commit is contained in:
John Baldwin
2019-07-15 17:21:36 -07:00
parent cbde90f25e
commit 206e6c58a7
4 changed files with 30 additions and 24 deletions

View File

@ -41,7 +41,7 @@ static arm_fbsd_nat_target the_arm_fbsd_nat_target;
/* Determine if PT_GETREGS fetches REGNUM. */
static bool
getregs_supplies (struct gdbarch *gdbarch, int regnum)
getregs_supplies (int regnum)
{
return ((regnum >= ARM_A1_REGNUM && regnum <= ARM_PC_REGNUM)
|| regnum == ARM_PS_REGNUM);
@ -51,7 +51,7 @@ getregs_supplies (struct gdbarch *gdbarch, int regnum)
/* Determine if PT_GETVFPREGS fetches REGNUM. */
static bool
getvfpregs_supplies (struct gdbarch *gdbarch, int regnum)
getvfpregs_supplies (int regnum)
{
return ((regnum >= ARM_D0_REGNUM && regnum <= ARM_D31_REGNUM)
|| regnum == ARM_FPSCR_REGNUM);
@ -66,8 +66,7 @@ arm_fbsd_nat_target::fetch_registers (struct regcache *regcache, int regnum)
{
pid_t pid = get_ptrace_pid (regcache->ptid ());
struct gdbarch *gdbarch = regcache->arch ();
if (regnum == -1 || getregs_supplies (gdbarch, regnum))
if (regnum == -1 || getregs_supplies (regnum))
{
struct reg regs;
@ -79,7 +78,7 @@ arm_fbsd_nat_target::fetch_registers (struct regcache *regcache, int regnum)
}
#ifdef PT_GETVFPREGS
if (regnum == -1 || getvfpregs_supplies (gdbarch, regnum))
if (regnum == -1 || getvfpregs_supplies (regnum))
{
struct vfpreg vfpregs;
@ -100,8 +99,7 @@ arm_fbsd_nat_target::store_registers (struct regcache *regcache, int regnum)
{
pid_t pid = get_ptrace_pid (regcache->ptid ());
struct gdbarch *gdbarch = regcache->arch ();
if (regnum == -1 || getregs_supplies (gdbarch, regnum))
if (regnum == -1 || getregs_supplies (regnum))
{
struct reg regs;
@ -116,7 +114,7 @@ arm_fbsd_nat_target::store_registers (struct regcache *regcache, int regnum)
}
#ifdef PT_GETVFPREGS
if (regnum == -1 || getvfpregs_supplies (gdbarch, regnum))
if (regnum == -1 || getvfpregs_supplies (regnum))
{
struct vfpreg vfpregs;