Module Name: src Committed By: skrll Date: Mon Jan 23 06:17:59 UTC 2012
Modified Files: src/external/gpl3/gdb/dist/gdb: i386nbsd-nat.c Log Message: Provide {supply,fill}_{g,fp}regset To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/i386nbsd-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/i386nbsd-nat.c diff -u src/external/gpl3/gdb/dist/gdb/i386nbsd-nat.c:1.2 src/external/gpl3/gdb/dist/gdb/i386nbsd-nat.c:1.3 --- src/external/gpl3/gdb/dist/gdb/i386nbsd-nat.c:1.2 Sun Sep 25 16:30:24 2011 +++ src/external/gpl3/gdb/dist/gdb/i386nbsd-nat.c Mon Jan 23 06:17:58 2012 @@ -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 @@ i386nbsd_supply_pcb (struct regcache *re 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);