From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MoJzr-0003aO-CO for qemu-devel@nongnu.org; Thu, 17 Sep 2009 12:38:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MoJzm-0003WE-JS for qemu-devel@nongnu.org; Thu, 17 Sep 2009 12:38:14 -0400 Received: from [199.232.76.173] (port=39516 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MoJzm-0003Vz-Bt for qemu-devel@nongnu.org; Thu, 17 Sep 2009 12:38:10 -0400 Received: from goliath.siemens.de ([192.35.17.28]:17382) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MoJzl-0004PY-Rn for qemu-devel@nongnu.org; Thu, 17 Sep 2009 12:38:10 -0400 Message-ID: <4AB265EA.9060109@siemens.com> Date: Thu, 17 Sep 2009 18:38:02 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4AB26055.2060506@siemens.com> In-Reply-To: <4AB26055.2060506@siemens.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] gdbstub: x86: Switch 64/32 bit registers dynamically List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity , Marcelo Tosatti Cc: Abhishek Saksena , qemu-devel Jan Kiszka wrote: > Commit 56aebc891674cd2d07b3f64183415697be200084 changed gdbstub in way > that debugging 32 or 16-bit guest code is no longer possible with qemu > for x86_64 guest CPUs. Since that commit, qemu only provides registers > sets for 64-bit, forcing current and foreseeable gdb to also switch its > architecture to 64-bit. And this breaks if the inferior is 32 or 16 bit. > > No question, this is a gdb issue. But, as it was confirmed in several > discusssions with gdb people, it is a non-trivial thing to fix. So until > qemu finds a gdb version attach with a rework x86 support, we have to > work around it by switching the register layout as the guest switches > its execution mode between 16/32 and 64 bit. > > Signed-off-by: Jan Kiszka > --- > Sent to qemu-kvm for inclusion on Avi's request as this workaround is > still disliked upstream. Sorry, mistyped the list address. Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux