From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27354 invoked by alias); 1 Sep 2002 22:12:02 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 27314 invoked from network); 1 Sep 2002 22:12:00 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (62.163.169.250) by sources.redhat.com with SMTP; 1 Sep 2002 22:12:00 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.5/8.12.5) with ESMTP id g81MBsML000264; Mon, 2 Sep 2002 00:11:54 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.5/8.12.5) with ESMTP id g81MBs3H001118; Mon, 2 Sep 2002 00:11:54 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.5/8.12.5/Submit) id g81MBs5o001115; Mon, 2 Sep 2002 00:11:54 +0200 (CEST) Date: Sun, 01 Sep 2002 15:12:00 -0000 Message-Id: <200209012211.g81MBs5o001115@elgar.kettenis.dyndns.org> From: Mark Kettenis To: drow@mvista.com CC: gdb@sources.redhat.com, gdb-patches@sources.redhat.com In-reply-to: <20020826205509.GB12224@nevyn.them.org> (message from Daniel Jacobowitz on Mon, 26 Aug 2002 16:55:09 -0400) 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> X-SW-Source: 2002-09/txt/msg00000.txt.bz2 Ok, I checked in that patch, attached here with ChangeLog entry. Mark Index: ChangeLog from Mark Kettenis * 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