From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22084 invoked by alias); 7 Dec 2001 00:00:23 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21987 invoked from network); 7 Dec 2001 00:00:22 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 7 Dec 2001 00:00:22 -0000 Received: from drow by nevyn.them.org with local (Exim 3.33 #1 (Debian)) id 16C8Rr-0007RN-00; Thu, 06 Dec 2001 19:01:03 -0500 Date: Thu, 06 Dec 2001 16:00:00 -0000 From: Daniel Jacobowitz To: Kevin Buettner Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH RFA] Fix x86 floating point vs. thread problem Message-ID: <20011206190103.A28378@nevyn.them.org> Mail-Followup-To: Kevin Buettner , gdb-patches@sources.redhat.com References: <1011206234806.ZM8667@ocotillo.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1011206234806.ZM8667@ocotillo.lan> User-Agent: Mutt/1.3.23i X-SW-Source: 2001-12/txt/msg00184.txt.bz2 On Thu, Dec 06, 2001 at 04:48:07PM -0700, Kevin Buettner wrote: > The patch below fixes the problem reported by David Relson in > > http://sources.redhat.com/ml/gdb/2001-12/msg00001.html > > An impressive test matrix regarding this bug has been provided by > Emmanuel Blindauer at > > http://manu.agat.net/bug.html > > Anyway, the problem is that GDB is computing the fpxregs version of > the tag value incorrectly. The fpxregs version of the tag value is > simply a bitmask (of eight bits) which indicate which of the floating > point registers is in use. i387_fill_fxsave() was incorrectly > shifting by twice the the number of bits that it should have. > > * i387-nat.c (i387_fill_fxsave): Change type of ``val'' from char > to short so that we don't memcpy() beyond the end of this buffer. > Also, change shift value used in computing val to account for the > fact that only eight bits are used. Out of curiousity, can you explain what I saw when looking at this? I found that we never set any fp-related register, and yet when the value of d was written to memory it was incorrect. Was it not actually yet written to memory, or was I just mistaken? -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer