Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFC] Info registers command produces no output for "standard register names"
Date: Sun, 29 May 2005 20:54:00 -0000	[thread overview]
Message-ID: <20050529192840.GA30304@nevyn.them.org> (raw)
In-Reply-To: <u4qcma87l.fsf@gnu.org>

On Sun, May 29, 2005 at 08:53:50AM +0300, Eli Zaretskii wrote:
> > 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...)

Good point.  In this case I don't think it makes much difference, but
it's definitely a good habit to get into; I'll fix that if the patch
goes in.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


      reply	other threads:[~2005-05-29 19:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-28 14:22 Fred Fish
2005-05-28 18:39 ` Daniel Jacobowitz
2005-05-29  6:13   ` Eli Zaretskii
2005-05-29 20:54     ` Daniel Jacobowitz [this message]

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=20050529192840.GA30304@nevyn.them.org \
    --to=drow@false.org \
    --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