Received: from [140.186.70.92] (port=59511 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcLb8-0002mA-So for qemu-devel@nongnu.org; Mon, 10 Jan 2011 12:32:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcLb4-00079T-3Y for qemu-devel@nongnu.org; Mon, 10 Jan 2011 12:32:02 -0500 Received: from hall.aurel32.net ([88.191.126.93]:36096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcLb3-00078q-Sq for qemu-devel@nongnu.org; Mon, 10 Jan 2011 12:31:58 -0500 Date: Mon, 10 Jan 2011 18:31:55 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] arm-dis: Include opcode hex when doing disassembly Message-ID: <20110110173155.GK17026@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. > Agreed. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net