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 hack to make sh3 build.
details: https://anonhg.NetBSD.org/src/rev/e72a84d4b968
branches: trunk
changeset: 773041:e72a84d4b968
user: christos <christos%NetBSD.org@localhost>
date: Wed Jan 25 17:01:02 2012 +0000
description:
hack to make sh3 build.
diffstat:
external/gpl3/gdb/dist/gdb/shnbsd-nat.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diffs (43 lines):
diff -r af5a29121323 -r e72a84d4b968 external/gpl3/gdb/dist/gdb/shnbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/shnbsd-nat.c Wed Jan 25 16:56:13 2012 +0000
+++ b/external/gpl3/gdb/dist/gdb/shnbsd-nat.c Wed Jan 25 17:01:02 2012 +0000
@@ -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 @@
}
}
+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);
Home |
Main Index |
Thread Index |
Old Index