Received: from [140.186.70.92] (port=42740 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pd1SY-0005ak-5Q for qemu-devel@nongnu.org; Wed, 12 Jan 2011 09:13:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pd1SX-0005DV-4T for qemu-devel@nongnu.org; Wed, 12 Jan 2011 09:13:58 -0500 Received: from hall.aurel32.net ([88.191.126.93]:42800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pd1SW-0005DE-S7 for qemu-devel@nongnu.org; Wed, 12 Jan 2011 09:13:57 -0500 Date: Wed, 12 Jan 2011 15:13:54 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] arm-dis: Include opcode hex when doing disassembly Message-ID: <20110112141354.GA7701@hall.aurel32.net> References: <1294676186-12518-1-git-send-email-peter.maydell@linaro.org> <20110110164926.GI17026@hall.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: Aurelien Jarno List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: riku voipio , qemu-devel@nongnu.org On Mon, Jan 10, 2011 at 11:09:28AM -0600, Peter Maydell wrote: > On 10 January 2011 10:49, Aurelien Jarno wrote: > > Strangely on arm host, the opcode hex is already included, as shown > > below: > > > > | OUT: [size=308] > > | 0x01001ec0:  e5974004  ldr      r4, [r7, #4] > > | 0x01001ec4:  e1a04804  lsl      r4, r4, #16 > > | 0x01001ec8:  e1a04824  lsr      r4, r4, #16 > > | 0x01001ecc:  e1a04404  lsl      r4, r4, #8 > > > > Maybe there is just an option to enable to allow that? > > It looks like that's just an ugly #ifdef in disas.c:disas(): > #ifdef __arm__ > /* since data is included in the code, it is better to > display code data too */ > fprintf(out, "%08x ", (int)bfd_getl32((const bfd_byte *)pc)); > #endif > > ...so I guess if we commit the patch I submitted we should > just delete that #ifdef. > I have applied this patch, and committed another one that removes this hack. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net