+2019-07-16 John Baldwin <jhb@FreeBSD.org>
+
+ * 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.
+
2019-07-16 John Baldwin <jhb@FreeBSD.org>
* fbsd-nat.c: Include gdbarch.h.
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+#include "regcache.h"
#include "target.h"
#include <sys/types.h>
/* Determine if PT_GETREGS fetches REGNUM. */
static bool
-getregs_supplies (struct gdbarch *gdbarch, int regnum)
+getregs_supplies (int regnum)
{
return (regnum >= AARCH64_X0_REGNUM && regnum <= AARCH64_CPSR_REGNUM);
}
/* Determine if PT_GETFPREGS fetches REGNUM. */
static bool
-getfpregs_supplies (struct gdbarch *gdbarch, int regnum)
+getfpregs_supplies (int regnum)
{
return (regnum >= AARCH64_V0_REGNUM && regnum <= AARCH64_FPCR_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;
sizeof (regs));
}
- if (regnum == -1 || getfpregs_supplies (gdbarch, regnum))
+ if (regnum == -1 || getfpregs_supplies (regnum))
{
struct fpreg fpregs;
{
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;
perror_with_name (_("Couldn't write registers"));
}
- if (regnum == -1 || getfpregs_supplies (gdbarch, regnum))
+ if (regnum == -1 || getfpregs_supplies (regnum))
{
struct fpreg fpregs;
/* 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);
/* 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);
{
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;
}
#ifdef PT_GETVFPREGS
- if (regnum == -1 || getvfpregs_supplies (gdbarch, regnum))
+ if (regnum == -1 || getvfpregs_supplies (regnum))
{
struct vfpreg vfpregs;
{
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;
}
#ifdef PT_GETVFPREGS
- if (regnum == -1 || getvfpregs_supplies (gdbarch, regnum))
+ if (regnum == -1 || getvfpregs_supplies (regnum))
{
struct vfpreg vfpregs;
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+#include "regcache.h"
#include "target.h"
#include <sys/types.h>
/* Determine if PT_GETREGS fetches REGNUM. */
static bool
-getregs_supplies (struct gdbarch *gdbarch, int regnum)
+getregs_supplies (int regnum)
{
return ((regnum >= RISCV_RA_REGNUM && regnum <= RISCV_PC_REGNUM)
|| regnum == RISCV_CSR_SSTATUS_REGNUM);
/* Determine if PT_GETFPREGS fetches REGNUM. */
static bool
-getfpregs_supplies (struct gdbarch *gdbarch, int regnum)
+getfpregs_supplies (int regnum)
{
return ((regnum >= RISCV_FIRST_FP_REGNUM && regnum <= RISCV_LAST_FP_REGNUM)
|| regnum == RISCV_CSR_FCSR_REGNUM);
{
pid_t pid = get_ptrace_pid (regcache->ptid ());
- struct gdbarch *gdbarch = regcache->arch ();
if (regnum == -1 || regnum == RISCV_ZERO_REGNUM)
regcache->raw_supply_zeroed (RISCV_ZERO_REGNUM);
- if (regnum == -1 || getregs_supplies (gdbarch, regnum))
+ if (regnum == -1 || getregs_supplies (regnum))
{
struct reg regs;
sizeof (regs));
}
- if (regnum == -1 || getfpregs_supplies (gdbarch, regnum))
+ if (regnum == -1 || getfpregs_supplies (regnum))
{
struct fpreg fpregs;
{
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;
perror_with_name (_("Couldn't write registers"));
}
- if (regnum == -1 || getfpregs_supplies (gdbarch, regnum))
+ if (regnum == -1 || getfpregs_supplies (regnum))
{
struct fpreg fpregs;