diff options
author | Mark Kettenis <kettenis@gnu.org> | 2003-10-26 15:03:42 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2003-10-26 15:03:42 +0000 |
commit | 930bb8acd2893091574650550b7db66fa6e0151a (patch) | |
tree | c120f9ece23ff5ec83b32e9f089e01a73aa255e7 /gdb/win32-nat.c | |
parent | 99463a16c94cb5266f2062e422dcb02baaa3b030 (diff) | |
download | gdb-930bb8acd2893091574650550b7db66fa6e0151a.tar.gz |
* i386-tdep.h (FCS_REGNUM, FCOFF_REGNUM, FDS_REGNUM,
FDOFF_REGNUM): Remove defines.
* win32-nat.c (do_child_fetch_inferior_registers): Include
"i387-tdep.h".
(do_child_fetch_inferior_registers): Use I387_FISEG_ST0_REGNUM and
I387_FOP_REGNUM instead of FCS_REGNUM and FOP_REGNUM. Define and
undefine I387_ST0_REGNUM.
Diffstat (limited to 'gdb/win32-nat.c')
-rw-r--r-- | gdb/win32-nat.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index ea0fc93397e..358bdf7a9f5 100644 --- a/gdb/win32-nat.c +++ b/gdb/win32-nat.c @@ -35,7 +35,6 @@ #include "completer.h" #include "regcache.h" #include "top.h" -#include "i386-tdep.h" #include <signal.h> #include <sys/types.h> #include <fcntl.h> @@ -54,6 +53,9 @@ #include <unistd.h> #include "exec.h" +#include "i386-tdep.h" +#include "i387-tdep.h" + /* The ui's event loop. */ extern int (*ui_loop_hook) (int signo); @@ -346,12 +348,15 @@ do_child_fetch_inferior_registers (int r) { char *context_offset = ((char *) ¤t_thread->context) + mappings[r]; long l; - if (r == FCS_REGNUM) + +#define I387_ST0_REGNUM I386_ST0_REGNUM + + if (r == I387_FISEG_REGNUM) { l = *((long *) context_offset) & 0xffff; supply_register (r, (char *) &l); } - else if (r == FOP_REGNUM) + else if (r == I387_FOP_REGNUM) { l = (*((long *) context_offset) >> 16) & ((1 << 11) - 1); supply_register (r, (char *) &l); @@ -363,6 +368,8 @@ do_child_fetch_inferior_registers (int r) for (r = 0; r < NUM_REGS; r++) do_child_fetch_inferior_registers (r); } + +#undef I387_ST0_REGNUM } static void |