This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
[PATCH] Re: Bizarre internal errors in regcache
- From: Mark Kettenis <kettenis at chello dot nl>
- To: drow at mvista dot com
- Cc: gdb at sources dot redhat dot com, gdb-patches at sources dot redhat dot com
- Date: Mon, 2 Sep 2002 00:11:54 +0200 (CEST)
- Subject: [PATCH] Re: Bizarre internal errors in regcache
- References: <20020826185639.GA19722@nevyn.them.org> <20020826195247.GA22760@nevyn.them.org> <200208262028.g7QKS88T001023@elgar.kettenis.dyndns.org> <20020826205509.GB12224@nevyn.them.org>
Ok, I checked in that patch, attached here with ChangeLog entry.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* i386-linux-nat.c (dummy_sse_values): Only try to fill in the SSE
registers if the target really has them.
Index: i386-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-linux-nat.c,v
retrieving revision 1.41
diff -u -p -r1.41 i386-linux-nat.c
--- i386-linux-nat.c 27 Aug 2002 22:37:06 -0000 1.41
+++ i386-linux-nat.c 1 Sep 2002 22:04:40 -0000
@@ -541,15 +541,17 @@ store_fpxregs (int tid, int regno)
static void
dummy_sse_values (void)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* C doesn't have a syntax for NaN's, so write it out as an array of
longs. */
static long dummy[4] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff };
static long mxcsr = 0x1f80;
int reg;
- for (reg = 0; reg < 8; reg++)
+ for (reg = 0; reg < tdep->num_xmm_regs; reg++)
supply_register (XMM0_REGNUM + reg, (char *) dummy);
- supply_register (MXCSR_REGNUM, (char *) &mxcsr);
+ if (tdep->num_xmm_regs > 0)
+ supply_register (MXCSR_REGNUM, (char *) &mxcsr);
}
#else