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 8504cc4a0c7ae922b0072e5bc75cf057cbc3a54d..eaa14d3a5a7a90a2553cc90b67eb9cf07045c41c 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 ee7e9c3acebe2a099789458a4e6a6296730a2932..2ba81ea2abade859ffe647e84ce764149bc56c13 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");
     }