This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] Fix i386 macro cleanup fall out in go32-nat.c
- From: Mark Kettenis <kettenis at kettenis dot dyndns dot org>
- To: eliz at gnu dot org, gdb-patches at sources dot redhat dot com
- Date: Sun, 20 Jan 2002 22:46:25 +0100 (CET)
- Subject: [RFA] Fix i386 macro cleanup fall out in go32-nat.c
- Reply-to: kettenis at gnu dot org
When doing the i386 register numbering macro cleanup, for some reason
I didn't look too closely at the native support files. That did break
several targets, Sorry. The attached fixes DJGPP.
Ok to check this in Eli?
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* go32-nat.c (fetch_register): Use FP_REGNUM_P and FPC_REGNUM_P
macros instead of LAST_FPU_CTRL_REGNUM.
(store_register): Likewise.
Index: go32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/go32-nat.c,v
retrieving revision 1.27
diff -u -p -r1.27 go32-nat.c
--- go32-nat.c 2002/01/13 09:51:22 1.27
+++ go32-nat.c 2002/01/20 21:45:40
@@ -466,7 +466,7 @@ fetch_register (int regno)
{
if (regno < FP0_REGNUM)
supply_register (regno, (char *) &a_tss + regno_mapping[regno].tss_ofs);
- else if (regno <= LAST_FPU_CTRL_REGNUM)
+ else if (FP_REGNUM_P (regno) || FPC_REGNUM_P (regno))
i387_supply_register (regno, (char *) &npx);
else
internal_error (__FILE__, __LINE__,
@@ -491,8 +491,8 @@ store_register (int regno)
{
if (regno < FP0_REGNUM)
regcache_collect (regno, (void *) &a_tss + regno_mapping[regno].tss_ofs);
- else if (regno <= LAST_FPU_CTRL_REGNUM)
- i387_fill_fsave ((char *)&npx, regno);
+ else if (FP_REGNUM_P (regno) || FPC_REGNUM_P (regno))
+ i387_fill_fsave ((char *) &npx, regno);
else
internal_error (__FILE__, __LINE__,
"Invalid register no. %d in store_register.", regno);