From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5845 invoked by alias); 29 May 2005 05:53:55 -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 5837 invoked by uid 22791); 29 May 2005 05:53:50 -0000 Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 29 May 2005 05:53:50 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-200-187.inter.net.il [83.130.200.187]) by romy.inter.net.il (MOS 3.5.8-GR) with ESMTP id BJI98176 (AUTH halo1); Sun, 29 May 2005 08:53:40 +0300 (IDT) Date: Sun, 29 May 2005 06:13:00 -0000 Message-Id: From: Eli Zaretskii To: Fred Fish CC: gdb-patches@sources.redhat.com In-reply-to: <20050528180657.GC26806@nevyn.them.org> (message from Daniel Jacobowitz on Sat, 28 May 2005 14:06:57 -0400) Subject: Re: [RFC] Info registers command produces no output for "standard register names" Reply-to: Eli Zaretskii References: <200505271737.58430.fnf@specifixinc.com> <20050528180657.GC26806@nevyn.them.org> X-SW-Source: 2005-05/txt/msg00609.txt.bz2 > 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...)