All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: marcel.a@redhat.com, qemu-devel <qemu-devel@nongnu.org>, mst@redhat.com
Subject: Re: [Qemu-devel] BUG: QEMU aborts when setting breakpoint in gdb (bisected)
Date: Wed, 06 Nov 2013 22:11:01 +0100	[thread overview]
Message-ID: <527AB065.1060301@redhat.com> (raw)
In-Reply-To: <20131106133622.7103f08c@redhat.com>

Il 06/11/2013 19:36, Luiz Capitulino ha scritto:
> On Wed, 06 Nov 2013 18:39:42 +0100
> Paolo Bonzini <pbonzini@redhat.com> 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

      reply	other threads:[~2013-11-06 21:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06 16:22 [Qemu-devel] BUG: QEMU aborts when setting breakpoint in gdb (bisected) Luiz Capitulino
2013-11-06 16:26 ` Paolo Bonzini
2013-11-06 16:29   ` Luiz Capitulino
2013-11-06 16:33   ` Michael S. Tsirkin
2013-11-06 16:30     ` Marcel Apfelbaum
2013-11-06 17:39 ` Paolo Bonzini
2013-11-06 17:48   ` Michael S. Tsirkin
2013-11-06 17:50     ` Paolo Bonzini
2013-11-06 18:39       ` Michael S. Tsirkin
2013-11-06 21:13         ` Paolo Bonzini
2013-11-06 21:36           ` Michael S. Tsirkin
2013-11-06 18:36   ` Luiz Capitulino
2013-11-06 21:11     ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=527AB065.1060301@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=marcel.a@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.