From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LEBVN-0002VS-Vf for qemu-devel@nongnu.org; Sat, 20 Dec 2008 18:45:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LEBVM-0002V6-4h for qemu-devel@nongnu.org; Sat, 20 Dec 2008 18:45:09 -0500 Received: from [199.232.76.173] (port=43432 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LEBVL-0002V3-Qj for qemu-devel@nongnu.org; Sat, 20 Dec 2008 18:45:07 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:53868) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LEBVL-0000el-8o for qemu-devel@nongnu.org; Sat, 20 Dec 2008 18:45:07 -0500 Message-ID: <494D8344.8010203@web.de> Date: Sun, 21 Dec 2008 00:44:04 +0100 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: gdbstub: packet reply is too long References: <1229776952.22890.2.camel@ws-aschultz> <200812202208.34044.paul@codesourcery.com> <494D72E1.6020104@web.de> <200812202246.39036.paul@codesourcery.com> In-Reply-To: <200812202246.39036.paul@codesourcery.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig137BD486943E2CDE38F0E4CA" 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: Andreas Schultz , qemu-devel@nongnu.org, kvm@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig137BD486943E2CDE38F0E4CA Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Paul Brook wrote: >> Do those archs also have multiple register layouts that are coupled to= >> those different instruction sets? Do they switch the instruction sets >> via 'set arch'? >=20 > No, but neither does x86. You just need to teach gdb how to debug 32-bi= t code=20 > on a 64-bit target. And that means setting current_gdbarch while keeping target_gdbarch - that's where reality (existing gdb code) bites us. Again, I'm not arguing against fixing this, I'm arguing in keeping qemu's workaround until this is done. I will look into the gdb part, but one after the othe= r. >=20 >> I think x86 is (historically) special here. >=20 > I think it's just that noone's made the effort to fix this problem. >=20 >> Fixing this (once understood what are all the problems preventing a fi= x >> for several years now) is one thing, keeping the workaround for curren= t >> gdb in qemu is, IMHO, another. Right now we don't have a gdb fix in >> sight, so I'm simply voting for reintroducing the workaround. That's >> all. We can kill it or make it optional once the issue is solved. But = we >> should _not_ do this _before_ it is solved, causing only pain to peopl= e >> who just want to use the gdbstub. >=20 > I don't buy this argument. You already have to tell gdb which mode to w= ork in,=20 > so I don't see any reason why you shouldn't also tell qemu. Sorry, this doesn't parse for me. What mechanism for qemu do you have in mind precisely? However, do we agree now that we have to adopt qemu to make it work with current gdb? >=20 > Recent GDB interrogate the target when they connect, and the target des= cribes=20 > the registers it has. This isn't currently implemented on x86 in qemu, = but=20 > I'm pretty sure it'd be incompatible with dynamic switching. I haven't checked gdb /wrt this protocol and x86 in details yet. But as far as I understand it, it does negotiation during startup. I wouldn't be surprised that all what the backend told gdb becomes pointless once you type "set arch i386". But this seems to be an orthogonal issue. Of course, we would have to communicate x86-64 capabilities this way, not the mode-dependent set. Jan --------------enig137BD486943E2CDE38F0E4CA 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 iEYEARECAAYFAklNg0gACgkQniDOoMHTA+ni7gCePWRCkg71B1uSy0gV0mmzhrjP TCUAnRbb2ifwK2a1Vu6MuIoyUEonJigC =7LhD -----END PGP SIGNATURE----- --------------enig137BD486943E2CDE38F0E4CA--