From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39793 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PtKzw-0002o2-TX for qemu-devel@nongnu.org; Sat, 26 Feb 2011 09:20:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PtKzn-0008UN-Gj for qemu-devel@nongnu.org; Sat, 26 Feb 2011 09:19:52 -0500 Received: from mail-fx0-f45.google.com ([209.85.161.45]:59960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PtKzn-0008Tu-BJ for qemu-devel@nongnu.org; Sat, 26 Feb 2011 09:19:43 -0500 Received: by fxm11 with SMTP id 11so2630725fxm.4 for ; Sat, 26 Feb 2011 06:19:42 -0800 (PST) Message-ID: <4D690B93.4090806@gmail.com> Date: Sat, 26 Feb 2011 16:17:55 +0200 From: vagran MIME-Version: 1.0 References: <4D681705.9090100@gmail.com> In-Reply-To: <4D681705.9090100@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: x86_64 debugging while in 32-bit mode List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org > Hi, > I have a problem with debugging 64-bit emulation using Qemu GDB stub. The > problem is that Qemu always sends x86_64 registers set disregarding > current > actual mode of an emulated CPU. It results in error message in GDB - > "Remote 'g' > packet reply is too long: ...". Yes, I understand that in case I will > execute > "set architecture i386:x86-64:intel" command it will show me correct > registers > content. But the problem is that in such case it will incorrectly try to > disassemble the code and unwind the stack - it will interpret it as > 64-bit while > it is actually 32-bit. In my understanding Qemu should dynamically > change the > format of "g" and "G" packets depending on current CPU mode. On the > other end, > user could change manually GDB current architecture by corresponding "set > architecture" command. > Please correct me, if I am not right. May be there is some existing > methodology > of debugging Qemu emulated x86_64 architecture in different CPU modes. > For now, > I have strong intention to make a patch for Qemu GDB stub, at least > for me. But > I have impression that this should be corrected in official release too. Hi, Seems the problem is not present on the latest version of the Qemu. I had several installed and occasionally launched old one. Sorry for inconvenience. Best regards, Artyom.