2002-05-20 Elena Zannoni <ezannoni@redhat.com>
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>
Mon, 20 May 2002 17:45:43 +0000 (17:45 +0000)
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>
Mon, 20 May 2002 17:45:43 +0000 (17:45 +0000)
* rs6000-tdep.c (rs6000_do_registers_info): Simplify code for
printing vector registers.

gdb/ChangeLog
gdb/rs6000-tdep.c

index 8504cc4..eaa14d3 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-20  Elena Zannoni  <ezannoni@redhat.com>
+
+       * rs6000-tdep.c (rs6000_do_registers_info): Simplify code for
+       printing vector registers.
+
 2002-05-19  Andrew Cagney  <ac131313@redhat.com>
 
        From Fernando Nasser:
index ee7e9c3..2ba81ea 100644 (file)
@@ -1853,19 +1853,16 @@ rs6000_do_registers_info (int regnum, int fpregs)
         }
       else
        {
-         /* Print as integer in hex and in decimal.  */
+         /* Print the register in hex.  */
+         val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+                    gdb_stdout, 'x', 1, 0, Val_pretty_default);
+          /* If not a vector register, print it also in decimal.  */
          if (!altivec_register_p (i))
            {
-             val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
-                        gdb_stdout, 'x', 1, 0, Val_pretty_default);
              printf_filtered ("\t");
              val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
                         gdb_stdout, 0, 1, 0, Val_pretty_default);
            }
-         else
-           /* Print as integer in hex only.  */
-           val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
-                      gdb_stdout, 'x', 1, 0, Val_pretty_default);
        }
       printf_filtered ("\n");
     }