From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18327 invoked by alias); 29 May 2005 19:28:50 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 18017 invoked by uid 22791); 29 May 2005 19:28:43 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 29 May 2005 19:28:43 +0000 Received: from drow by nevyn.them.org with local (Exim 4.50) id 1DcTSj-0007tv-9y for gdb-patches@sources.redhat.com; Sun, 29 May 2005 15:28:41 -0400 Date: Sun, 29 May 2005 20:54:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [RFC] Info registers command produces no output for "standard register names" Message-ID: <20050529192840.GA30304@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <200505271737.58430.fnf@specifixinc.com> <20050528180657.GC26806@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-SW-Source: 2005-05/txt/msg00629.txt.bz2 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 > > 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