From: Elena Zannoni <ezannoni@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA] rs6000-tdep.c: simplify reg printing code
Date: Mon, 20 May 2002 07:23:00 -0000 [thread overview]
Message-ID: <15593.1725.928607.237135@localhost.redhat.com> (raw)
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");
}
next reply other threads:[~2002-05-20 14:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-20 7:23 Elena Zannoni [this message]
2002-05-20 8:29 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15593.1725.928607.237135@localhost.redhat.com \
--to=ezannoni@redhat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox