Module Name: src
Committed By: christos
Date: Wed Jan 25 17:01:02 UTC 2012
Modified Files:
src/external/gpl3/gdb/dist/gdb: shnbsd-nat.c
Log Message:
hack to make sh3 build.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gdb/dist/gdb/shnbsd-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/shnbsd-nat.c
diff -u src/external/gpl3/gdb/dist/gdb/shnbsd-nat.c:1.4 src/external/gpl3/gdb/dist/gdb/shnbsd-nat.c:1.5
--- src/external/gpl3/gdb/dist/gdb/shnbsd-nat.c:1.4 Mon Oct 31 17:00:39 2011
+++ src/external/gpl3/gdb/dist/gdb/shnbsd-nat.c Wed Jan 25 12:01:02 2012
@@ -34,7 +34,16 @@
#include "nbsd-nat.h"
-
+#ifndef HAVE_GREGSET_T
+typedef struct reg gregset_t;
+#endif
+
+#ifndef HAVE_FPREGSET_T
+struct fpreg { };
+typedef struct fpreg fpregset_t;
+#endif
+#include "gregset.h"
+
/* Determine if PT_GETREGS fetches this register. */
#define GETREGS_SUPPLIES(gdbarch, regno) \
(((regno) >= R0_REGNUM && (regno) <= (R0_REGNUM + 15)) \
@@ -91,6 +100,22 @@ shnbsd_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 set 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"));
+}
+
/* Provide a prototype to silence -Wmissing-prototypes. */
void _initialize_shnbsd_nat (void);