/* Native-dependent code for BSD Unix running on ARM's, for GDB.
- Copyright (C) 1988, 1989, 1991, 1992, 1994, 1996, 1999, 2002, 2004, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 1988-2015 Free Software Foundation, Inc.
This file is part of GDB.
#include "inferior.h"
#include "regcache.h"
#include "target.h"
-
-#include "gdb_string.h"
#include <sys/types.h>
#include <sys/ptrace.h>
#include <machine/reg.h>
struct reg inferior_registers;
int ret;
- ret = ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+ ret = ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
(PTRACE_TYPE_ARG3) &inferior_registers, 0);
if (ret < 0)
break;
case ARM_PC_REGNUM:
- /* This is ok: we're running native... */
+ /* This is ok: we're running native... */
inferior_registers.r_pc = gdbarch_addr_bits_remove
(get_regcache_arch (regcache),
inferior_registers.r_pc);
int ret;
int regno;
- ret = ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+ ret = ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
(PTRACE_TYPE_ARG3) &inferior_registers, 0);
if (ret < 0)
struct fpreg inferior_fp_registers;
int ret;
- ret = ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+ ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
if (ret < 0)
int ret;
int regno;
- ret = ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+ ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
if (ret < 0)
}
static void
-armnbsd_fetch_registers (struct regcache *regcache, int regno)
+armnbsd_fetch_registers (struct target_ops *ops,
+ struct regcache *regcache, int regno)
{
if (regno >= 0)
{
struct reg inferior_registers;
int ret;
- ret = ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+ ret = ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
(PTRACE_TYPE_ARG3) &inferior_registers, 0);
if (ret < 0)
break;
}
- ret = ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+ ret = ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
(PTRACE_TYPE_ARG3) &inferior_registers, 0);
if (ret < 0)
inferior_registers.r_pc = pc_val | psr_val;
}
- ret = ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+ ret = ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
(PTRACE_TYPE_ARG3) &inferior_registers, 0);
if (ret < 0)
struct fpreg inferior_fp_registers;
int ret;
- ret = ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+ ret = ptrace (PT_GETFPREGS, ptid_get_pid (inferior_ptid),
(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
if (ret < 0)
break;
}
- ret = ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
+ ret = ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
if (ret < 0)
regcache_raw_collect (regcache, ARM_FPS_REGNUM,
(char *) &inferior_fp_registers.fpr_fpsr);
- ret = ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
+ ret = ptrace (PT_SETFPREGS, ptid_get_pid (inferior_ptid),
(PTRACE_TYPE_ARG3) &inferior_fp_registers, 0);
if (ret < 0)
}
static void
-armnbsd_store_registers (struct regcache *regcache, int regno)
+armnbsd_store_registers (struct target_ops *ops,
+ struct regcache *regcache, int regno)
{
if (regno >= 0)
{