struct regcache *regcache, int regnum)
{
struct reg regs;
+ pid_t pid = ptid_get_pid (regcache_get_ptid (regcache));
- if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) ®s, 0) == -1)
+ if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1)
perror_with_name (_("Couldn't get registers"));
vaxbsd_supply_gregset (regcache, ®s);
struct regcache *regcache, int regnum)
{
struct reg regs;
+ pid_t pid = ptid_get_pid (regcache_get_ptid (regcache));
- if (ptrace (PT_GETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) ®s, 0) == -1)
+ if (ptrace (PT_GETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1)
perror_with_name (_("Couldn't get registers"));
vaxbsd_collect_gregset (regcache, ®s, regnum);
- if (ptrace (PT_SETREGS, ptid_get_pid (inferior_ptid),
- (PTRACE_TYPE_ARG3) ®s, 0) == -1)
+ if (ptrace (PT_SETREGS, pid, (PTRACE_TYPE_ARG3) ®s, 0) == -1)
perror_with_name (_("Couldn't write registers"));
}
\f
return 1;
}
-\f
-
-/* Provide a prototype to silence -Wmissing-prototypes. */
-void _initialize_vaxbsd_nat (void);
void
_initialize_vaxbsd_nat (void)