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 Provide {supply, fill}_{g, fp}regset
details: https://anonhg.NetBSD.org/src/rev/2898e2e707f6
branches: trunk
changeset: 772987:2898e2e707f6
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Jan 23 06:17:58 2012 +0000
description:
Provide {supply,fill}_{g,fp}regset
diffstat:
external/gpl3/gdb/dist/gdb/i386nbsd-nat.c | 51 +++++++++++++++++++++++++++++++
1 files changed, 51 insertions(+), 0 deletions(-)
diffs (79 lines):
diff -r 299cfc03d797 -r 2898e2e707f6 external/gpl3/gdb/dist/gdb/i386nbsd-nat.c
--- a/external/gpl3/gdb/dist/gdb/i386nbsd-nat.c Mon Jan 23 04:12:26 2012 +0000
+++ b/external/gpl3/gdb/dist/gdb/i386nbsd-nat.c Mon Jan 23 06:17:58 2012 +0000
@@ -24,17 +24,29 @@
#include "target.h"
#include "i386-tdep.h"
+#include "i387-tdep.h"
#include "i386bsd-nat.h"
/* Support for debugging kernel virtual memory images. */
#include <sys/types.h>
+#include <machine/reg.h>
#include <machine/frame.h>
#include <machine/pcb.h>
#include "nbsd-nat.h"
#include "bsd-kvm.h"
+#ifndef HAVE_GREGSET_T
+typedef struct reg gregset_t;
+#endif
+
+#ifndef HAVE_FPREGSET_T
+typedef struct fpreg fpregset_t;
+#endif
+
+#include "gregset.h"
+
static int
i386nbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
{
@@ -97,6 +109,45 @@
return 1;
}
+void
+supply_gregset (struct regcache *regcache, const gregset_t *gregsetp)
+{
+ i386bsd_supply_gregset (regcache, gregsetp);
+}
+
+/* Fill register REGNUM (if it is a general-purpose register) in
+ *GREGSETP with the value in GDB's register cache. If REGNUM is -1,
+ do this for all registers. */
+
+void
+fill_gregset (const struct regcache *regcache,
+ gregset_t *gregsetp, int regnum)
+{
+ i386bsd_collect_gregset (regcache, gregsetp, regnum);
+}
+
+/* Transfering floating-point registers between GDB, inferiors and cores. */
+
+/* Fill GDB's register cache with the floating-point and SSE register
+ values in *FPREGSETP. */
+
+void
+supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp)
+{
+ i387_supply_fsave (regcache, -1, fpregsetp);
+}
+
+/* Fill register REGNUM (if it is a floating-point or SSE register) in
+ *FPREGSETP with the value in GDB's register cache. If REGNUM is
+ -1, do this for all registers. */
+
+void
+fill_fpregset (const struct regcache *regcache,
+ fpregset_t *fpregsetp, int regnum)
+{
+ i387_collect_fsave (regcache, regnum, fpregsetp);
+}
+
/* Provide a prototype to silence -Wmissing-prototypes. */
void _initialize_i386nbsd_nat (void);
Home |
Main Index |
Thread Index |
Old Index