This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] rs6000-tdep.c: simplify reg printing code
- From: Elena Zannoni <ezannoni at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 20 May 2002 10:22:53 -0400
- Subject: [RFA] rs6000-tdep.c: simplify reg printing code
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");
}