diff options
author | Michael Snyder <msnyder@vmware.com> | 2002-04-24 21:44:47 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2002-04-24 21:44:47 +0000 |
commit | 57e76facc3ddc7822ff71a3fcc55b324c1f0bb1d (patch) | |
tree | ad67cb0847a1d37611f7199d794603296d29f77a /gdb/i386gnu-nat.c | |
parent | 11832e60a3c7c3b4798df6139e8f24f16267031a (diff) | |
download | gdb-57e76facc3ddc7822ff71a3fcc55b324c1f0bb1d.zip gdb-57e76facc3ddc7822ff71a3fcc55b324c1f0bb1d.tar.gz gdb-57e76facc3ddc7822ff71a3fcc55b324c1f0bb1d.tar.bz2 |
2002-04-24 Roland McGrath <roland@frob.com>
* config/i386/i386gnu.mh (NATDEPFILES): Add core-regset.o here.
* i386gnu-nat.c [HAVE_SYS_PROCFS_H]
(supply_gregset, supply_fpregset): New functions.
* gnu-nat.c (gnu_find_memory_regions): New function.
(init_gnu_ops): Set `to_find_memory_regions' hook to that.
(gnu_xfer_memory): Add a cast.
Diffstat (limited to 'gdb/i386gnu-nat.c')
-rw-r--r-- | gdb/i386gnu-nat.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c index 9188ea4..e82fe0d 100644 --- a/gdb/i386gnu-nat.c +++ b/gdb/i386gnu-nat.c @@ -38,6 +38,10 @@ #include "gnu-nat.h" #include "i387-nat.h" +#ifdef HAVE_SYS_PROCFS_H +# include <sys/procfs.h> +# include "gregset.h" +#endif /* Offset to the thread_state_t location where REG is stored. */ #define REG_OFFSET(reg) offsetof (struct i386_thread_state, reg) @@ -88,6 +92,24 @@ fetch_fpregs (struct proc *thread) i387_supply_fsave (state.hw_state); } +#ifdef HAVE_SYS_PROCFS_H +/* These two calls are used by the core-regset.c code for + reading ELF core files. */ +void +supply_gregset (gdb_gregset_t *gregs) +{ + int i; + for (i = 0; i < NUM_GREGS; i++) + supply_register (i, REG_ADDR (gregs, i)); +} + +void +supply_fpregset (gdb_fpregset_t *fpregs) +{ + i387_supply_fsave ((char *) fpregs); +} +#endif + /* Fetch register REGNO, or all regs if REGNO is -1. */ void gnu_fetch_registers (int regno) |