Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH RFA] Fix x86 floating point vs. thread problem
Date: Thu, 06 Dec 2001 16:00:00 -0000	[thread overview]
Message-ID: <20011206190103.A28378@nevyn.them.org> (raw)
In-Reply-To: <1011206234806.ZM8667@ocotillo.lan>

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


  reply	other threads:[~2001-12-07  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-06 15:48 Kevin Buettner
2001-12-06 16:00 ` Daniel Jacobowitz [this message]
2001-12-06 16:27   ` Kevin Buettner
2001-12-12 12:25 ` Mark Kettenis
2001-12-13  9:38   ` Kevin Buettner
2001-12-13 15:48     ` Mark Kettenis
     [not found]       ` <kettenis@science.uva.nl>
2001-12-18 16:22         ` Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011206190103.A28378@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kevinb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox