/* Functions specific to running GDB native on HPPA running GNU/Linux.
- Copyright (C) 2004-2018 Free Software Foundation, Inc.
+ Copyright (C) 2004-2019 Free Software Foundation, Inc.
This file is part of GDB.
#include "target.h"
#include "linux-nat.h"
#include "inf-ptrace.h"
+#include "gdbarch.h"
#include <sys/procfs.h>
#include "nat/gdb_ptrace.h"
if (gdbarch_cannot_fetch_register (gdbarch, regno))
{
- regcache_raw_supply (regcache, regno, NULL);
+ regcache->raw_supply (regno, NULL);
return;
}
gdbarch_register_name (gdbarch, regno),
regno, safe_strerror (errno));
- regcache_raw_supply (regcache, regno, &val);
+ regcache->raw_supply (regno, &val);
}
/* Store one register. */
tid = get_ptrace_pid (regcache->ptid ());
errno = 0;
- regcache_raw_collect (regcache, regno, &val);
+ regcache->raw_collect (regno, &val);
ptrace (PTRACE_POKEUSER, tid, hppa_linux_register_addr (regno, 0), val);
if (errno != 0)
error (_("Couldn't write register %s (#%d): %s."),
point registers depending upon the value of regno. */
void
-hppa_linux_nat_target::fetch_inferior_registers (struct regcache *regcache,
- int regno)
+hppa_linux_nat_target::fetch_registers (struct regcache *regcache, int regno)
{
if (-1 == regno)
{
for (i = 0; i < sizeof (greg_map) / sizeof (greg_map[0]); i++, regp++)
{
int regno = greg_map[i];
- regcache_raw_supply (regcache, regno, regp);
+ regcache->raw_supply (regno, regp);
}
}
int mregno = greg_map[i];
if (regno == -1 || regno == mregno)
- {
- regcache_raw_collect(regcache, mregno, &(*gregsetp)[i]);
- }
+ regcache->raw_collect (mregno, &(*gregsetp)[i]);
}
}
for (regi = 0; regi <= 31; regi++)
{
from = (const char *) &((*fpregsetp)[regi]);
- regcache_raw_supply (regcache, 2*regi + HPPA_FP0_REGNUM, from);
- regcache_raw_supply (regcache, 2*regi + HPPA_FP0_REGNUM + 1, from + 4);
+ regcache->raw_supply (2*regi + HPPA_FP0_REGNUM, from);
+ regcache->raw_supply (2*regi + HPPA_FP0_REGNUM + 1, from + 4);
}
}
char *to = (char *) &((*fpregsetp)[(i - HPPA_FP0_REGNUM) / 2]);
if ((i - HPPA_FP0_REGNUM) & 1)
to += 4;
- regcache_raw_collect (regcache, i, to);
+ regcache->raw_collect (i, to);
}
}