This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] Info registers command produces no output for "standard register names"
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Fred Fish <fnf at specifixinc dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 29 May 2005 08:53:50 +0300
- Subject: Re: [RFC] Info registers command produces no output for "standard register names"
- References: <200505271737.58430.fnf@specifixinc.com> <20050528180657.GC26806@nevyn.them.org>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Sat, 28 May 2005 14:06:57 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: gdb-patches@sources.redhat.com
>
> + fprintf_filtered (file, "\t(raw 0x");
> + len = TYPE_LENGTH (value_type (regval));
> + buffer = value_contents (regval);
> + for (j = 0; j < len; j++)
> + {
> + int idx;
> + if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
> + idx = j;
> + else
> + idx = len - 1 - j;
> + fprintf_filtered (file, "%02x", (unsigned char) buffer[idx]);
> + }
> + fprintf_filtered (file, ")");
Daniel, this kind of output generation loop is bad for i18n. So how
about if we produce the entire numerical string in memory, then print
it all, as a string, in one go, together with its decorations? (Yes,
I know you just copied the old code, but as long as we are
changing...)