From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VeANf-0001ks-Lj for qemu-devel@nongnu.org; Wed, 06 Nov 2013 16:11:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VeANX-0006nH-5P for qemu-devel@nongnu.org; Wed, 06 Nov 2013 16:11:15 -0500 Received: from mail-ee0-x233.google.com ([2a00:1450:4013:c00::233]:59053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VeANW-0006nA-Ua for qemu-devel@nongnu.org; Wed, 06 Nov 2013 16:11:07 -0500 Received: by mail-ee0-f51.google.com with SMTP id t10so30787eei.38 for ; Wed, 06 Nov 2013 13:11:06 -0800 (PST) Sender: Paolo Bonzini Message-ID: <527AB065.1060301@redhat.com> Date: Wed, 06 Nov 2013 22:11:01 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <20131106112214.14a448b6@redhat.com> <527A7EDE.3060409@redhat.com> <20131106133622.7103f08c@redhat.com> In-Reply-To: <20131106133622.7103f08c@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] BUG: QEMU aborts when setting breakpoint in gdb (bisected) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: marcel.a@redhat.com, qemu-devel , mst@redhat.com Il 06/11/2013 19:36, Luiz Capitulino ha scritto: > On Wed, 06 Nov 2013 18:39:42 +0100 > Paolo Bonzini wrote: > >> Il 06/11/2013 17:22, Luiz Capitulino ha scritto: >>> 1. Run qemu with gdb server support >>> >>> # qemu [...] -s -S >>> >>> 2. Connect gdb and try to set a breakpoint >>> >>> $ gdb /path/to/vmlinux >>> (gdb) target remote:1234 >>> (gdb) b secondary_startup_64 >> >> (Note that this doesn't make much sense until the kernel has been loaded >> into memory. You probably want hbreak instead). > > hbreak didn't work either, gdb doesn't stop at the breakpoint. I tried to > test this with another random function and got a "Remote 'g' packet > reply is too long" (which seems to be yet another different problem). Yeah, that's very messy and it would nice to have a fix for it, but I don't know enough about gdb to say whether it's fixable. It happens when the processor switches from 32 to 64-bit under gdb's feet. The solution is typically to do "set arch i386:x86-64" before running the guest with "c" if you know the breakpoint will happen in 64-bit mode. Paolo