aboutsummaryrefslogtreecommitdiff
path: root/gdb/shnbsd-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/shnbsd-nat.c')
-rw-r--r--gdb/shnbsd-nat.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/shnbsd-nat.c b/gdb/shnbsd-nat.c
index 90b0406..1aad4ba 100644
--- a/gdb/shnbsd-nat.c
+++ b/gdb/shnbsd-nat.c
@@ -28,7 +28,6 @@
#include <machine/reg.h>
#include "sh-tdep.h"
-#include "shnbsd-tdep.h"
#include "inf-ptrace.h"
#include "regcache.h"
@@ -40,6 +39,9 @@
|| (regno) == MACH_REGNUM || (regno) == MACL_REGNUM \
|| (regno) == SR_REGNUM)
+/* Sizeof `struct reg' in <machine/reg.h>. */
+#define SHNBSD_SIZEOF_GREGS (21 * 4)
+
static void
shnbsd_fetch_inferior_registers (struct target_ops *ops,
struct regcache *regcache, int regno)
@@ -52,7 +54,9 @@ shnbsd_fetch_inferior_registers (struct target_ops *ops,
(PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1)
perror_with_name (_("Couldn't get registers"));
- shnbsd_supply_reg (regcache, (char *) &inferior_registers, regno);
+ sh_corefile_supply_regset (&sh_corefile_gregset, regcache, regno,
+ (char *) &inferior_registers,
+ SHNBSD_SIZEOF_GREGS);
if (regno != -1)
return;
@@ -71,7 +75,9 @@ shnbsd_store_inferior_registers (struct target_ops *ops,
(PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1)
perror_with_name (_("Couldn't get registers"));
- shnbsd_fill_reg (regcache, (char *) &inferior_registers, regno);
+ sh_corefile_collect_regset (&sh_corefile_gregset, regcache, regno,
+ (char *) &inferior_registers,
+ SHNBSD_SIZEOF_GREGS);
if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
(PTRACE_TYPE_ARG3) &inferior_registers, 0) == -1)