Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] rs6000-tdep.c: simplify reg printing code
@ 2002-05-20  7:23 Elena Zannoni
  2002-05-20  8:29 ` Kevin Buettner
  0 siblings, 1 reply; 2+ messages in thread
From: Elena Zannoni @ 2002-05-20  7:23 UTC (permalink / raw)
  To: gdb-patches


This patch simplifies a bit the code for printing vector registers.

Elena

2002-05-20  Elena Zannoni  <ezannoni@redhat.com>

	* rs6000-tdep.c (rs6000_do_registers_info): Simplify code for
	printing vector registers.


Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/uberbaum/gdb/rs6000-tdep.c,v
retrieving revision 1.64
diff -u -p -r1.64 rs6000-tdep.c
--- rs6000-tdep.c	12 May 2002 02:16:04 -0000	1.64
+++ rs6000-tdep.c	20 May 2002 14:20:31 -0000
@@ -1853,19 +1853,16 @@ rs6000_do_registers_info (int regnum, in
         }
       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");
     }


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

* Re: [RFA] rs6000-tdep.c: simplify reg printing code
  2002-05-20  7:23 [RFA] rs6000-tdep.c: simplify reg printing code Elena Zannoni
@ 2002-05-20  8:29 ` Kevin Buettner
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Buettner @ 2002-05-20  8:29 UTC (permalink / raw)
  To: Elena Zannoni, gdb-patches

On May 20, 10:22am, Elena Zannoni wrote:

> 2002-05-20  Elena Zannoni  <ezannoni@redhat.com>
> 
> 	* rs6000-tdep.c (rs6000_do_registers_info): Simplify code for
> 	printing vector registers.

It looks fine to me.  Go ahead and commit it...

Thanks,

Kevin


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

end of thread, other threads:[~2002-05-20 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-20  7:23 [RFA] rs6000-tdep.c: simplify reg printing code Elena Zannoni
2002-05-20  8:29 ` Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox