From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LwJwv-00062y-6X for qemu-devel@nongnu.org; Tue, 21 Apr 2009 13:40:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LwJwt-000619-HI for qemu-devel@nongnu.org; Tue, 21 Apr 2009 13:40:00 -0400 Received: from [199.232.76.173] (port=43404 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LwJwt-000610-FW for qemu-devel@nongnu.org; Tue, 21 Apr 2009 13:39:59 -0400 Received: from smtp22.services.sfr.fr ([93.17.128.13]:26608) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LwJws-0005Go-NO for qemu-devel@nongnu.org; Tue, 21 Apr 2009 13:39:59 -0400 Subject: Re: [Qemu-devel] [PATCH] multi-bytes nop and 64bits From: Mark Karpeles In-Reply-To: References: <1240249899.9112.2867.camel@localhost> <1240295938.9112.3529.camel@localhost> Content-Type: text/plain; charset="UTF-8" Date: Tue, 21 Apr 2009 19:39:54 +0200 Message-Id: <1240335594.9112.3536.camel@localhost> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: qemu-devel@nongnu.org Le mardi 21 avril 2009 =C3=A0 21:20 +0400, malc a =C3=A9crit : > > Patch: > > http://ookoo.org/svn/snip/qemu-0.10.1-nopl-fix.patch >=20 > I'm not intimately familiar with binutils' disasm but it looks correct > save for the fact that hint_nop take M and not Ev as operand, which > might be irrelevant for disassembler though... To tell you the truth, I had a look at the current (ie. gdb 6.8) gdb disassembler, and saw it was "Ev". It also produces correct result when I look at the disassembled code (while the operand is irrelevant, it gives a hint regarding the whole opcode's size). I believe those who knows best how this decompiler works are those who have continued to improve it, so I didn't look too deep in this, just backported support for multibyte nop to code used in qemu (tried to port the whole decompiler, but it changed too much, and I'm too lazy to attempt to fix that). I'm just adding [PATCH] to the subject, just to let everyone here know this mail contains a patch. I successfully tested it on 3 machines without problems and it already saved my day once by showing me where my kernel was stopping (I'm in the process of porting from 32bits to 64bits, knowing what happens inside is a great help). Anyway the decompiler obviously needs to be either re-made, or re-imported from gdb, but this little patch will help until someone with better knowledge of qemu and gdb does it. Mark