Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb/dist/gdb make powerpc compile.



details:   https://anonhg.NetBSD.org/src/rev/dd22f294808a
branches:  trunk
changeset: 773050:dd22f294808a
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jan 25 19:24:21 2012 +0000

description:
make powerpc compile.

diffstat:

 external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c |  42 ++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)

diffs (59 lines):

diff -r 13f947d3a89d -r dd22f294808a external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c  Wed Jan 25 19:03:35 2012 +0000
+++ b/external/gpl3/gdb/dist/gdb/ppcnbsd-nat.c  Wed Jan 25 19:24:21 2012 +0000
@@ -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 @@
     }
 }
 
+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)
 {



Home | Main Index | Thread Index | Old Index