public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* Re: tdep/2561: MMX register number to register value mapping is incorrect
@ 2008-12-08  6:38 Tom Honermann
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Honermann @ 2008-12-08  6:38 UTC (permalink / raw)
  To: nobody; +Cc: gdb-prs

The following reply was made to PR tdep/2561; it has been noted by GNATS.

From: Tom Honermann <tom.honermann@oracle.com>
To: gdb-gnats@sources.redhat.com
Cc:  
Subject: Re: tdep/2561: MMX register number to register value mapping is incorrect
Date: Sun, 07 Dec 2008 22:34:16 -0800

 This is a multi-part message in MIME format.
 --------------040908000103080301060504
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Attached is a better test case for this bug report.
 
 Tom.
 
 gdb-gnats@sources.redhat.com wrote:
 > Thank you very much for your problem report.
 > It has the internal identification `tdep/2561'.
 > The individual assigned to look at your
 > report is: unassigned. 
 >
 >   
 >> Category:       tdep
 >> Responsible:    unassigned
 >> Synopsis:       MMX register number to register value mapping is incorrect
 >> Arrival-Date:   Mon Dec 08 05:58:01 UTC 2008
 >>     
 
 --------------040908000103080301060504
 Content-Type: application/x-gzip;
  name="test-gdb-mmx-bug.tar.gz"
 Content-Transfer-Encoding: base64
 Content-Disposition: inline;
  filename="test-gdb-mmx-bug.tar.gz"
 
 H4sIAL6xPEkAA+1XbW/bNhD21/pXHDx4sFxbod4du82XYgj2IUCBrMOAzCgUibaFSKInUk7S
 ov99R1myLNWav6QZhvExYFm8F5J3zx1pQbmYrsP7aZI8Te/z9UXv5UEQnuPg07Ac1yyfpBgv
 0TMQnmER10G5Ydme3QPnB6zlO+Rc+BlAT2xYSrPE79ILgq14jfW8MkQ7/0e/9eBl5pAJdm27
 K/+2RbxD/h3Lxfw7nmP1gLzM9P+M/3n+f4rSIM5DCu+4CCOmb676x0NZlK7lWD9KBSR+lI60
 /tc+IPKUR+uUhsA3LBPwNPM+YyQFvTPs5QIuxnIEihEYX5yyWG35I7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BQUFBQUFBQUFBQUFBQUFBQUFD4MfgbqQITDwAoAAA=
 --------------040908000103080301060504--


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: tdep/2561: MMX register number to register value mapping is incorrect
@ 2008-12-08 21:18 Tom Honermann
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Honermann @ 2008-12-08 21:18 UTC (permalink / raw)
  To: nobody; +Cc: gdb-prs

The following reply was made to PR tdep/2561; it has been noted by GNATS.

From: Tom Honermann <tom.honermann@oracle.com>
To: gdb-gnats@sources.redhat.com
Cc:  
Subject: Re: tdep/2561: MMX register number to register value mapping is incorrect
Date: Mon, 08 Dec 2008 13:10:31 -0800

 Ok, so I'm not very familiar with the GDB bug reporting app (gnatsweb).  
 It seems the UI doesn't offer a way to attach new files.  I added a note 
 previously via email with an attachment and the attachment was included 
 in Base64 format.  I suspect some users might not know how to turn the 
 Base64 encoded content back into a file they can work with, so I'm 
 adding the updated test case again with some instructions for how to get 
 the original .tar.gz archive.
 
 To re-create the test case files on a Linux system, save the content 
 below starting with 'begin-base64' and ending with '====' in a file (ie, 
 'test-gdb-mmx-bug.b64'), and then run 'uudecode test-gdb-mmx-bug.b64'.  
 This will create a new file named 'test-gdb-mmx-bug.tar.gz' which can be 
 unarchived by running 'tar -zxvf test-gdb-mmx-bug.tar.gz'.  A new 
 directory named 'test-gdb-mmx-bug' will be created that contains the 
 test case.
 
 begin-base64 644 test-gdb-mmx-bug.tar.gz
  H4sIAL6xPEkAA+1XbW/bNhD21/pXHDx4sFxbod4du82XYgj2IUCBrMOAzCgUibaFSKInUk7S
  ov99R1myLNWav6QZhvExYFm8F5J3zx1pQbmYrsP7aZI8Te/z9UXv5UEQnuPg07Ac1yyfpBgv
  0TMQnmER10G5Ydme3QPnB6zlO+Rc+BlAT2xYSrPE79ILgq14jfW8MkQ7/0e/9eBl5pAJdm27
  K/+2RbxD/h3Lxfw7nmP1gLzM9P+M/3n+f4rSIM5DCu+4CCOmb676x0NZlK7lWD9KBSR+l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o5c5VGyAxt/C/pt1EMA0sczmOExZ01cQUz+d999kCUxX
  xyIIsP+pqlVQUFBQUFBQUFBQUFBQUFBQUFBQUFD4MfgbqQITDwAoAAA=
 ====


^ permalink raw reply	[flat|nested] 3+ messages in thread

* tdep/2561: MMX register number to register value mapping is incorrect
@ 2008-12-08  5:58 tom.honermann
  0 siblings, 0 replies; 3+ messages in thread
From: tom.honermann @ 2008-12-08  5:58 UTC (permalink / raw)
  To: gdb-gnats


>Number:         2561
>Category:       tdep
>Synopsis:       MMX register number to register value mapping is incorrect
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 08 05:58:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Tom Honermann
>Release:        gdb-6.8
>Organization:
>Environment:
Linux 2.6.9 - Oracle Enterprise Linux 4u4 (Equiv to RedHat 4u4)
>Description:
Intel MMX registers (mm0-mm7) are aliased to the x87 floating point registers (st0-st7).  The x87 floating point registers comprise a register stack that revolves as values are pushed onto it.  The MMX registers however are directly mapped to the backing store for the floating point registers (r0-r7).  Thus, mm0==r0, mm1==r1, ...mm7=r7 but st0 is not necessarily equal to r0.  When displaying MMX registers, gdb computes the association between the MMX and x87 data registers incorrectly.
>How-To-Repeat:
Compile the attached program as a 32bit x86 Linux program  (Makefile included).  Run it and it will display what the MMX register values should be.  The program will then generate a SIGSEGV to break into gdb at a good point for analyzing the x87 and MMX registers.  Run the program in GDB and when the SIGSEGV is received, run 'info all-reg' to see all registers.  Compare the GDB mm0-mm7 register values to those displayed by the program.  The values to register number mapping will be off.
>Fix:
The problem is in 'i386_mmx_regnum_to_fp_regnum' in gdb-6.8/gdb/i386-tdep.c.  The current code for computing the association is:

    fpreg = (mmxreg + tos) % 8;

This should be:

    fpreg = ((8 + mmxreg) - tos) % 8;
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-tar; name="test-g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YZuf
1uFq9PtcS9XWpX782/q/X8hnxovz30/iXmb4GnvDMWbOf4QG/OT8z6nLzfnvHBB5voFn+besZw8b
eNwNMPpbYL3bJgmsC88dt8O6GnsluRTlxnpXF7DOnlOQVLX82mrNwMDAwMDAwMDAwMDAwMDAwMDA
wMDAwMDgHPgH15VZ9QAoAAA=


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-08 21:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-08  6:38 tdep/2561: MMX register number to register value mapping is incorrect Tom Honermann
  -- strict thread matches above, loose matches on Subject: below --
2008-12-08 21:18 Tom Honermann
2008-12-08  5:58 tom.honermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).