From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nzzcd-0004Qj-Lg for qemu-devel@nongnu.org; Thu, 08 Apr 2010 17:50:47 -0400 Received: from [140.186.70.92] (port=39021 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nzzcc-0004Py-3Y for qemu-devel@nongnu.org; Thu, 08 Apr 2010 17:50:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nzzca-00049a-5l for qemu-devel@nongnu.org; Thu, 08 Apr 2010 17:50:45 -0400 Received: from hall.aurel32.net ([88.191.82.174]:57823) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NzzcZ-00049T-Uf for qemu-devel@nongnu.org; Thu, 08 Apr 2010 17:50:44 -0400 Date: Thu, 8 Apr 2010 21:03:35 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 01/48] arm-dis debug helper Message-ID: <20100408190335.GA6056@volta.aurel32.net> References: <4fc35202c28544bebaab3bee440a6bc8f9e04d83.1269617186.git.riku.voipio@nokia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4fc35202c28544bebaab3bee440a6bc8f9e04d83.1269617186.git.riku.voipio@nokia.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Riku Voipio Cc: Riku Voipio , Juha =?iso-8859-15?Q?Riihim=E4ki?= , qemu-devel@nongnu.org On Fri, Mar 26, 2010 at 04:06:24PM +0000, Riku Voipio wrote: > From: Juha Riihimäki > > modified the arm disassembler to include the opcode binary representation along > with the symbolic disassembly. > > Signed-Off-By: Riku Voipio > Signed-Off-By: Juha Riihimäki > --- > arm-dis.c | 10 ++++++++-- > 1 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/arm-dis.c b/arm-dis.c > index 4fb899e..2b37c24 100644 > --- a/arm-dis.c > +++ b/arm-dis.c > @@ -4101,8 +4101,14 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info) > In such cases, we can ignore the pc when computing > addresses, since the addend is not currently pc-relative. */ > pc = 0; > - > - printer (pc, info, given); > + if (size == 2) { > + info->fprintf_func(info->stream, "[%04lx] ", > + ((unsigned long)given) & 0xffffffff); Is the mask here correct? As far as I understand, we only want to keep 16 bits here. > + } else { > + info->fprintf_func(info->stream, "[%08lx] ", > + ((unsigned long)given) & 0xffffffff); > + } > + printer (pc, info, given); > > if (is_thumb) > { > -- > 1.6.5 > > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net