Module Name: src
Committed By: christos
Date: Wed Jan 25 19:24:21 UTC 2012
Modified Files:
src/external/gpl3/gdb/dist/gdb: ppcnbsd-nat.c
Log Message:
make powerpc compile.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c:1.4 src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c:1.5
--- src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c:1.4 Sun Jan 22 15:27:28 2012
+++ src/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c Wed Jan 25 14:24:21 2012
@@ -39,6 +39,16 @@
#include "bsd-kvm.h"
#include "inf-ptrace.h"
+#ifndef HAVE_GREGSET_T
+typedef struct reg gregset_t;
+#endif
+
+#ifndef HAVE_FPREGSET_T
+typedef struct fpreg fpregset_t;
+#endif
+#include "gregset.h"
+
+
/* Returns true if PT_GETREGS fetches this register. */
static int
@@ -149,6 +159,38 @@ ppcnbsd_store_inferior_registers (struct
}
}
+void
+supply_gregset (struct regcache *regcache, const gregset_t *gregs)
+{
+ if (ptrace (PT_SETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) gregs, TIDGET (inferior_ptid)) == -1)
+ perror_with_name (_("Couldn't write registers"));
+}
+
+void
+supply_fpregset (struct regcache *regcache, const fpregset_t *fpregs)
+{
+ if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) fpregs, TIDGET (inferior_ptid)) == -1)
+ perror_with_name (_("Couldn't set FP registers"));
+}
+
+void
+fill_gregset (const struct regcache *regcache, gregset_t *gregs, int regnum)
+{
+ if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) gregs, TIDGET (inferior_ptid)) == -1)
+ perror_with_name (_("Couldn't get registers"));
+}
+
+void
+fill_fpregset (const struct regcache *regcache, fpregset_t *fpregs, int regnum)
+{
+ if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
+ (PTRACE_TYPE_ARG3) fpregs, TIDGET (inferior_ptid)) == -1)
+ perror_with_name (_("Couldn't get FP registers"));
+}
+
static int
ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
{