aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2003-10-26 15:03:42 +0000
committerMark Kettenis <kettenis@gnu.org>2003-10-26 15:03:42 +0000
commit6c7de4224ecf600584d3b0bd2ec5c671aa3d9be6 (patch)
treecb6fc6bcef432f984a6b812a18c60e885115596d /gdb
parentf783586b81cab0d6b8b4a8590d17a53ccb7c1231 (diff)
downloadgdb-6c7de4224ecf600584d3b0bd2ec5c671aa3d9be6.zip
gdb-6c7de4224ecf600584d3b0bd2ec5c671aa3d9be6.tar.gz
gdb-6c7de4224ecf600584d3b0bd2ec5c671aa3d9be6.tar.bz2
* 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')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/i386-tdep.h6
-rw-r--r--gdb/win32-nat.c13
-rw-r--r--gdb/windows-nat.c13
4 files changed, 28 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 004ed17..0172119 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2003-10-26 Mark Kettenis <kettenis@gnu.org>
+ * 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.
+
* i386-tdep.h (FPU_REG_RAW_SIZE): Remove define.
* x86-64-tdep.c (x86_64_store_return_value): Use
I386_MAX_REGISTER_SIZE instead of FPU_REG_RAW_SIZE.
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
index 1b5b6a3..2c48979 100644
--- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h
@@ -150,12 +150,6 @@ extern int i386_fpc_regnum_p (int regnum);
#define MXCSR_REGNUM \
(XMM0_REGNUM + gdbarch_tdep (current_gdbarch)->num_xmm_regs)
-/* FIXME: kettenis/2001-11-24: Obsolete macro's. */
-#define FCS_REGNUM FISEG_REGNUM
-#define FCOFF_REGNUM FIOFF_REGNUM
-#define FDS_REGNUM FOSEG_REGNUM
-#define FDOFF_REGNUM FOOFF_REGNUM
-
/* Register numbers of various important registers. */
enum i386_regnum
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index ea0fc93..358bdf7 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 *) &current_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
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index ea0fc93..358bdf7 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-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 *) &current_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