From: Andrew Cagney <ac131313@ges.redhat.com>
To: Elena Zannoni <ezannoni@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] infcmd.c print vector registers in hex only
Date: Tue, 20 Aug 2002 08:04:00 -0000 [thread overview]
Message-ID: <3D625A71.5060900@ges.redhat.com> (raw)
In-Reply-To: <15714.21367.161116.563645@localhost.redhat.com>
> Elena Zannoni writes:
> >
> > Doing this simplification allows to get rid of a function (for now,
> > more later) in rs6000-tdep.c. Such function is entirely a duplicate of
> > do_registers_info, except for this patch.
> >
> > The reason behind this is that vector registers use up a lot of
> > screen real estate, especially the 128 bit ones (altivec registers).
> >
> > Elena
> >
>
> To clarify:
> With this patch each register is printed like this:
> (gdb) info reg vr0
> vr0 {uint128 = 0x00000000000000000000000000000000, v4_float = {0x0,
> 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v8_int16 = {0x0, 0x0,
> 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}}
>
> while w/o the patch:
> (gdb) info reg vr0
> vr0 {uint128 = 0x00000000000000000000000000000000, v4_float = {0x0,
> 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v8_int16 = {0x0, 0x0,
> 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}} {
> uint128 = 0x00000000000000000000000000000000, v4_float = {0, 0, 0, 0},
> v4_int32 = {0, 0, 0, 0}, v8_int16 = {0, 0, 0, 0, 0, 0, 0, 0},
> v16_int8 = '\0' <repeats 15 times>}
Er, yes. The old style just looks silly :-)
> > + /* Print the register in hex. */
> > 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);
> > + /* If not a vector register, print it also in decimal. */
> > + if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)) == 0)
> > + {
> > + printf_filtered ("\t");
> > + val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
> > + gdb_stdout, 0, 1, 0, Val_pretty_default);
> > + }
The (old) comment should probably, also, be fixed. That isn't printing
the value in decimal.
enjoy,
Andrew
next prev parent reply other threads:[~2002-08-20 15:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-18 20:07 Elena Zannoni
2002-08-20 7:36 ` Elena Zannoni
2002-08-20 8:04 ` Andrew Cagney [this message]
2002-08-20 9:32 ` Elena Zannoni
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=3D625A71.5060900@ges.redhat.com \
--to=ac131313@ges.redhat.com \
--cc=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