From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L2ZgO-0002Z8-5t for qemu-devel@nongnu.org; Tue, 18 Nov 2008 18:08:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L2ZgM-0002Yv-Mk for qemu-devel@nongnu.org; Tue, 18 Nov 2008 18:08:31 -0500 Received: from [199.232.76.173] (port=34668 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2ZgM-0002Ys-Gr for qemu-devel@nongnu.org; Tue, 18 Nov 2008 18:08:30 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:54168) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L2ZgM-000764-Fn for qemu-devel@nongnu.org; Tue, 18 Nov 2008 18:08:30 -0500 Message-ID: <49234ABB.90303@web.de> Date: Wed, 19 Nov 2008 00:07:39 +0100 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH v5 18/18] gdbstub: x86: Switch 64/32 bit registers dynamically References: <20081117161857.26880.45423.stgit@mchn012c.ww002.siemens.net> <49233776.9050504@codemonkey.ws> <492343C2.8080604@web.de> <200811182246.54653.paul@codesourcery.com> In-Reply-To: <200811182246.54653.paul@codesourcery.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig5174B958593B23DB3E07A7A2" Sender: jan.kiszka@web.de Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5174B958593B23DB3E07A7A2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Paul Brook wrote: >> The best approach, definitely, would be to teach GDB how to switch the= >> disassembler mode depending on the thread's (or VCPUs) state. But so >> there is neither a mechanism in GDB for this, nor is GDB even aware of= >> the x86 modes (no tracking of privileged registers). We have some >> preliminary patches for this, but they are still far away from GDB >> mainline. >=20 > I'm pretty sure all the infrastructure is there. gdb is able to nativel= y debug=20 > 32-bit binaries on a 64-bit host and is able to switch disassembler mod= es for=20 > ARM vs. Thumb. How is it done on ARM? Maybe that will provide the right pointer for x86.= For fun I recently tried to debug a 32-bit binary on a 64-bit host via gdbserver - the fun ended as quickly as with qemu. The only way for switching disassembly mode on x86 that I found is via set arch, and that switching the register packet format as well. Jan --------------enig5174B958593B23DB3E07A7A2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkkjSr4ACgkQniDOoMHTA+matwCeK4MMGuCzD4tr+6mOPglNZ143 zz8An1hCHeAmd6uSArs8S2eDEqXPzjwR =7c0A -----END PGP SIGNATURE----- --------------enig5174B958593B23DB3E07A7A2--