This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Fix for floating-point-less i386 targets
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 20 Aug 2002 20:08:05 +0200 (CEST)
- Subject: [PATCH] Fix for floating-point-less i386 targets
There's a problem with the current code on OS/ABI variants without
floating-point registers. Mainline currently doesn't include such
variants, but my intention is to include such variants in the future.
Checked in.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* i386-tdep.h (FP_REGNUM_P): Change such that we don't incorrectly
flag the general-purpose registers as floating-point on targets
that don't support the floating-point registers.
Index: i386-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.h,v
retrieving revision 1.12
diff -u -p -r1.12 i386-tdep.h
--- i386-tdep.h 16 Aug 2002 22:44:00 -0000 1.12
+++ i386-tdep.h 20 Aug 2002 17:51:50 -0000
@@ -114,7 +114,7 @@ struct gdbarch_tdep
#define FOP_REGNUM (FPC_REGNUM + 7)
/* Return non-zero if N corresponds to a FPU data registers. */
-#define FP_REGNUM_P(n) (FP0_REGNUM <= (n) && (n) < FPC_REGNUM)
+#define FP_REGNUM_P(n) (FP0_REGNUM && FP0_REGNUM <= (n) && (n) < FPC_REGNUM)
/* Return non-zero if N corresponds to a FPU control register. */
#define FPC_REGNUM_P(n) (FPC_REGNUM <= (n) && (n) < XMM0_REGNUM)