From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LEAar-0003a6-GP for qemu-devel@nongnu.org; Sat, 20 Dec 2008 17:46:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LEAap-0003Zu-5V for qemu-devel@nongnu.org; Sat, 20 Dec 2008 17:46:44 -0500 Received: from [199.232.76.173] (port=34264 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LEAap-0003Zr-0H for qemu-devel@nongnu.org; Sat, 20 Dec 2008 17:46:43 -0500 Received: from mx20.gnu.org ([199.232.41.8]:52389) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LEAao-0004eu-Lu for qemu-devel@nongnu.org; Sat, 20 Dec 2008 17:46:42 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LEAan-0005B2-Je for qemu-devel@nongnu.org; Sat, 20 Dec 2008 17:46:41 -0500 From: Paul Brook Subject: Re: [Qemu-devel] Re: gdbstub: packet reply is too long Date: Sat, 20 Dec 2008 22:46:38 +0000 References: <1229776952.22890.2.camel@ws-aschultz> <200812202208.34044.paul@codesourcery.com> <494D72E1.6020104@web.de> In-Reply-To: <494D72E1.6020104@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812202246.39036.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Andreas Schultz , Jan Kiszka , kvm@vger.kernel.org > 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'? No, but neither does x86. You just need to teach gdb how to debug 32-bit code on a 64-bit target. > I think x86 is (historically) special here. I think it's just that noone's made the effort to fix this problem. > Fixing this (once understood what are all the problems preventing a fix > for several years now) is one thing, keeping the workaround for current > 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 people > who just want to use the gdbstub. I don't buy this argument. You already have to tell gdb which mode to work in, so I don't see any reason why you shouldn't also tell qemu. Recent GDB interrogate the target when they connect, and the target describes the registers it has. This isn't currently implemented on x86 in qemu, but I'm pretty sure it'd be incompatible with dynamic switching. Paul