From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6774 invoked by alias); 16 Jan 2012 23:52:35 -0000 Received: (qmail 6759 invoked by uid 22791); 16 Jan 2012 23:52:34 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-gx0-f169.google.com (HELO mail-gx0-f169.google.com) (209.85.161.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Jan 2012 23:52:20 +0000 Received: by ggnp4 with SMTP id p4so3359752ggn.0 for ; Mon, 16 Jan 2012 15:52:20 -0800 (PST) Received: by 10.236.136.200 with SMTP id w48mr20141730yhi.22.1326757940008; Mon, 16 Jan 2012 15:52:20 -0800 (PST) Received: from bubble.grove.modra.org ([115.187.252.19]) by mx.google.com with ESMTPS id o50sm33097741yhl.9.2012.01.16.15.52.17 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 Jan 2012 15:52:19 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 02F66170C2EA; Tue, 17 Jan 2012 10:22:13 +1030 (CST) Date: Mon, 16 Jan 2012 23:52:00 -0000 From: Alan Modra To: James Murray Cc: binutils@sourceware.org Subject: Re: Duplicate 0x prefix - cr16 - bug. no. 10173 Message-ID: <20120116235212.GQ3708@bubble.grove.modra.org> Mail-Followup-To: James Murray , binutils@sourceware.org References: <1324919489.2430.89.camel@jsm2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1324919489.2430.89.camel@jsm2> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00193.txt.bz2 On Mon, Dec 26, 2011 at 05:11:29PM +0000, James Murray wrote: > Regarding: > http://sourceware.org/bugzilla/show_bug.cgi?id=10173 > > The fix for the duplicate 0x prefix on numbers during disassembly was: > > --- src/opcodes/cr16-dis.c 2008/11/27 11:30:33 1.5 > +++ src/opcodes/cr16-dis.c 2009/06/15 15:24:52 1.6 > @@ -678,7 +678,9 @@ > + /* PR 10173: Avoid printing the 0x prefix twice. */ > + if (info->num_symbols > 0) > + func (stream, "%s", "0x"); > > > I'm wondering if that might be better as > + if (info->symtab_size > 0) Applied. -- Alan Modra Australia Development Lab, IBM