public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/10154] GDB 6.6 won't display XMM registers: <error reading variable>
       [not found] <bug-10154-4717@http.sourceware.org/bugzilla/>
@ 2011-06-27 17:01 ` tromey at redhat dot com
  0 siblings, 0 replies; 4+ messages in thread
From: tromey at redhat dot com @ 2011-06-27 17:01 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=10154

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |tromey at redhat dot com
         Resolution|                            |FIXED

--- Comment #7 from Tom Tromey <tromey at redhat dot com> 2011-06-27 17:01:28 UTC ---
Reported as fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug fortran/10154] GDB 6.6 won't display XMM registers: <error reading variable>
  2009-05-14 23:32 [Bug mi/10154] New: " jim dot conyngham at amd dot com
  2009-05-18 17:32 ` [Bug fortran/10154] " jim dot conyngham at amd dot com
  2009-05-18 18:08 ` jim dot conyngham at amd dot com
@ 2009-05-19 16:02 ` jim dot conyngham at amd dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jim dot conyngham at amd dot com @ 2009-05-19 16:02 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From jim dot conyngham at amd dot com  2009-05-19 16:02 -------
Apparently this is fixed in the current sources.

The version 6.8 that I downloaded from ftp.gnu.org/gnu/gdb was packed up 27 
March 2008.  The changelogs in the current sources indicate that support for 
TYPE_CODE_UNION was added to f-valprint.c in April 2008.




-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10154

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug fortran/10154] GDB 6.6 won't display XMM registers: <error reading variable>
  2009-05-14 23:32 [Bug mi/10154] New: " jim dot conyngham at amd dot com
  2009-05-18 17:32 ` [Bug fortran/10154] " jim dot conyngham at amd dot com
@ 2009-05-18 18:08 ` jim dot conyngham at amd dot com
  2009-05-19 16:02 ` jim dot conyngham at amd dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jim dot conyngham at amd dot com @ 2009-05-18 18:08 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From jim dot conyngham at amd dot com  2009-05-18 18:08 -------
Sorry for the confusion -- I did not realize at first that this issue was 
specific to Fortran source programs.

After more investigation, and debugging with the GDB sources, I've found that 
the problem is you can't display the XMM registers if the source language is 
Fortran.   But they do display OK if the source language is C or C++.

A workaround for the problem is "set source c++" while debugging Fortran.

The problem is that the $xmm# registers are defined as objects of 
TYPE_CODE_UNION and the Fortran language does not support unions.  (The 
EQUIVALENCE statement notwithstanding.)

When a user enters a "p $xmm0" command, this object is passed to the f_val_print
() function in gdb/f-valprint.c.  The switch therein does not have a case 
statement for that type code so the default case is executed, which throws and 
error.

I've created my own local fix by implementing a case TYPE_CODE_UNION clause in 
f-valprint.c, which is good enough for my own purposes as a temporary hack.  
I'm attaching the diff of the patch below for information only; I am NOT 
suggesting that this is an acceptable long-term solution.

Presumably, other languages besides Fortran that don't support the union type 
would have the same problem.

Presumably, the same problem will be encountered when AVX registers are 
supported by GDB.  (I assume someone at Intel is working on this.)

-----------------------------------
605,620c605
<       break;
< 
<     case TYPE_CODE_UNION:
<       /* This is not a valid Fortran data type, but if the user is
<        * debugging a Fortran source and tries to display a SIMD register
<        * e.g., "print $xmm0"  then we wind up here.
<        * HACK: pass this to c++ language object
<        */
<       {
<     	const struct language_defn * lang_cpp = language_def (language_cplus);
<     	if ((lang_cpp != NULL) && (lang_cpp != current_language))
<    	      return lang_cpp->la_val_print (type, valaddr, embedded_offset,
<     		     address, stream, format,
<     		     deref_ref, recurse, pretty);
<     	// else FALL THRU.
<       }
---
>       break;     


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10154

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug fortran/10154] GDB 6.6 won't display XMM registers: <error reading variable>
  2009-05-14 23:32 [Bug mi/10154] New: " jim dot conyngham at amd dot com
@ 2009-05-18 17:32 ` jim dot conyngham at amd dot com
  2009-05-18 18:08 ` jim dot conyngham at amd dot com
  2009-05-19 16:02 ` jim dot conyngham at amd dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jim dot conyngham at amd dot com @ 2009-05-18 17:32 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From jim dot conyngham at amd dot com  2009-05-18 17:31 -------
Changing the "component" from MI (machine interface) to Fortran.   (Sorry for 
the inconvenience. I was mislead by the error message.)

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|mi                          |fortran


http://sourceware.org/bugzilla/show_bug.cgi?id=10154

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2011-06-27 17:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-10154-4717@http.sourceware.org/bugzilla/>
2011-06-27 17:01 ` [Bug fortran/10154] GDB 6.6 won't display XMM registers: <error reading variable> tromey at redhat dot com
2009-05-14 23:32 [Bug mi/10154] New: " jim dot conyngham at amd dot com
2009-05-18 17:32 ` [Bug fortran/10154] " jim dot conyngham at amd dot com
2009-05-18 18:08 ` jim dot conyngham at amd dot com
2009-05-19 16:02 ` jim dot conyngham at amd dot com

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).