Received: from [140.186.70.92] (port=58283 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ow8Na-00024Q-Dl for qemu-devel@nongnu.org; Thu, 16 Sep 2010 02:55:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ow8NZ-0000KW-6B for qemu-devel@nongnu.org; Thu, 16 Sep 2010 02:55:34 -0400 Received: from adelie.canonical.com ([91.189.90.139]:35249) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ow8NY-0000KQ-Sb for qemu-devel@nongnu.org; Thu, 16 Sep 2010 02:55:33 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1Ow8NY-0004rt-0j for ; Thu, 16 Sep 2010 07:55:32 +0100 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id F164E2E80BF for ; Thu, 16 Sep 2010 06:55:31 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 16 Sep 2010 06:49:02 -0000 From: Ted Harkington <640213@bugs.launchpad.net> Sender: bounces@canonical.com References: <20100916064902.14555.15191.malonedeb@potassium.ubuntu.com> Message-Id: <20100916064902.14555.15191.malonedeb@potassium.ubuntu.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 640213] [NEW] QEMU does not communicate properly with GDB with a 64 bit guest Reply-To: Bug 640213 <640213@bugs.launchpad.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Public bug reported: I have been trying to figure out why I cannot debug a 64 bit kernel of my own invention. I launch qemu-system-x86_64 with the -s -S flags, we also specify -cpu core2duo -vga std and a -hda with an ext2 FS holding our multiboot kernel and GRUB2. When I try to set breakpoints and "continue" in GDB (7.2) using the very latest HEAD (b6601141cd2a170dfe773987b06f716a190ea7e0) or 0.12.0 or 0.12.5 or 13.0.rc0 or 13.0.rc1, I get failures of the same nature: 0x0000000000000000 in ?? () (gdb) break main Breakpoint 1 at 0x101730: file src/kernel/init.c, line 18. (gdb) c Program received signal SIGTRAP, Trace/breakpoint trap. 0x0000000000000000 in ?? () (gdb) Note that in this case, main lies in 64 bit mode. However, trying to break on _start yields virtually the same effect and _start is 32 bit code. By doing a git bisect, I managed to narrow the commit that introduced this = bug to 5f30fa18ad043a841fe9f0c3917ac60f2519ebd1. Reverting this commit on H= EAD seemingly fixed the problem for both the 32 bit and 64 bit cases. I might be doing something incorrectly on my end but this seemed to fix the= problem. Perhaps the pertinent thing to do would be to revert 5f30fa18ad043a841fe9f0c3917ac60f2519ebd1 as it seems to do nothing but break things unless, of course, this would only break something that I am not aware of further. ** Affects: qemu Importance: Undecided Status: New -- = QEMU does not communicate properly with GDB with a 64 bit guest https://bugs.launchpad.net/bugs/640213 You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. Status in QEMU: New Bug description: I have been trying to figure out why I cannot debug a 64 bit kernel of my o= wn invention. I launch qemu-system-x86_64 with the -s -S flags, we also specify -cpu core= 2duo -vga std and a -hda with an ext2 FS holding our multiboot kernel and G= RUB2. When I try to set breakpoints and "continue" in GDB (7.2) using the very la= test HEAD (b6601141cd2a170dfe773987b06f716a190ea7e0) or 0.12.0 or 0.12.5 or= 13.0.rc0 or 13.0.rc1, I get failures of the same nature: 0x0000000000000000 in ?? () (gdb) break main Breakpoint 1 at 0x101730: file src/kernel/init.c, line 18. (gdb) c Program received signal SIGTRAP, Trace/breakpoint trap. 0x0000000000000000 in ?? () (gdb) Note that in this case, main lies in 64 bit mode. However, trying to break = on _start yields virtually the same effect and _start is 32 bit code. By doing a git bisect, I managed to narrow the commit that introduced this = bug to 5f30fa18ad043a841fe9f0c3917ac60f2519ebd1. Reverting this commit on H= EAD seemingly fixed the problem for both the 32 bit and 64 bit cases. I might be doing something incorrectly on my end but this seemed to fix the= problem. Perhaps the pertinent thing to do would be to revert 5f30fa18ad043a841fe9f0= c3917ac60f2519ebd1 as it seems to do nothing but break things unless, of co= urse, this would only break something that I am not aware of further.