From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50541 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZk1H-0005vn-W3 for qemu-devel@nongnu.org; Mon, 03 Jan 2011 08:00:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZk1G-0006Is-8W for qemu-devel@nongnu.org; Mon, 03 Jan 2011 08:00:15 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:37520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZk1F-0006IQ-T3 for qemu-devel@nongnu.org; Mon, 03 Jan 2011 08:00:14 -0500 Message-ID: <4D21C85A.5070207@web.de> Date: Mon, 03 Jan 2011 14:00:10 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <4D21A474.2040909@salomon.at> <4D21AFB5.9010605@web.de> <4D21BDFA.1050105@salomon.at> <4D21C0AA.8010907@salomon.at> In-Reply-To: <4D21C0AA.8010907@salomon.at> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB924D1618D9AAB578098E763" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: Debugging a 64-bit kernel in qemu List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Duft Cc: gdb@sourceware.org, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB924D1618D9AAB578098E763 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable [ please keep CCs ] Am 03.01.2011 13:27, Markus Duft wrote: > On 01/03/2011 01:15 PM, Markus Duft wrote: >> On 01/03/2011 12:15 PM, Jan Kiszka wrote: >> [snip] > [snip] >> actually, i find that Ted Harkington was right: in 0.11.1 i can debug = 32 bit code with qemu-system-x86_64 well enough (which means i debugged a= ll the 32 bit part of my kernel without ever seen _any_ problem/non-worki= ng feature/whatever). wouldn't it be better to have 64 bit debugging work= ing in the 64 bit version, with 32 bit mode working mostly (with whatever= small issues), rather than just completely dooming 64 bit debugging...? >> >=20 > owh - spoke too soon. there must be more to it: i tried reverting 5f30f= a18ad043a841fe9f0c3917ac60f2519ebd1, which restores ability to debug my 6= 4 bit kernel just fine, but now i get the packet too long when trying to = debug 32 bit code.... Hmm, that's new. You definitely loose stack unwinding when using the wrong mode, thus source-level debugging. I thought that thread suggested to set the arch explicitly, maybe I misremembered that: set arch i386:x86_64 tar rem :1234 If that is required, you probably load a 32-bit binary into gdb that also contains 64-bit code in some section. I guess this is even more confusing for gdb. >=20 > wouldn't it be possible to implement some kind of explicit switch with = qemu in the meantime, so i can choose what bitness i want to debug? I kno= w, it's a problem with gdb under the hood, but still - it's really uncool= debugging doesn't work in either of the two cases. Wasn't required so far. If you debug in either mode, "set arch" should do the job. If you have to debug across mode switches, that knob won't help anyway. Jan --------------enigB924D1618D9AAB578098E763 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.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk0hyFoACgkQitSsb3rl5xTjMgCeM3QZ+6niMysNvZvimgwuEZvz W/kAn31oIrWet0ojtHeKxjAbW642aUKS =PipB -----END PGP SIGNATURE----- --------------enigB924D1618D9AAB578098E763--