From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kxhj6-0007Xz-Q8 for qemu-devel@nongnu.org; Wed, 05 Nov 2008 07:43:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kxhj6-0007Xj-9X for qemu-devel@nongnu.org; Wed, 05 Nov 2008 07:43:12 -0500 Received: from [199.232.76.173] (port=45356 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kxhj6-0007Xg-4M for qemu-devel@nongnu.org; Wed, 05 Nov 2008 07:43:12 -0500 Received: from mail2.shareable.org ([80.68.89.115]:33702) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kxhj6-0007uC-27 for qemu-devel@nongnu.org; Wed, 05 Nov 2008 07:43:12 -0500 Date: Wed, 5 Nov 2008 12:43:09 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH] gdbstub: x86-64: reintroduce dynamic register sets Message-ID: <20081105124309.GF13630@shareable.org> References: <491084F7.2050800@siemens.com> <200811041742.58859.paul@codesourcery.com> <49108D03.4000204@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49108D03.4000204@siemens.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: Paul Brook Jan Kiszka wrote: > Paul Brook wrote: > > On Tuesday 04 November 2008, Jan Kiszka wrote: > >> Commit 5459 broke the dynamic register set switching of qemu's gdbstub > >> for x86-64. This prevents setting the correct architecture in gdb when > >> debugging 32 or 16-bit code in a 64-bit emulator. Fix this. > > > > Is this really a feature? Surely any attached gdb is going to break horribly > > when we transition from a 64-bit to a 32-bit code segment. > > Well, it would be real feature if gdb was smart enough to track those > switches automatically... > > However, you can (and obviously have to) call "set arch ..." after that > switch in order to get the proper disassembly. Or you happen to use > qemu-system-x86_64 with a 32-bit guest and fire up gdb with the > appropriate 32-bit binary directly. Both used to work fine. How does it handle mixed 32-bit and 16-bit code? (Since you mentioned it supports 16-bit code). Does that require manual intervention too? -- Jamie