qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Avi Kivity <avi@redhat.com>
Cc: qemu-devel@nongnu.org, Craig Brozefsky <craig@red-bean.com>
Subject: Re: [Qemu-devel] Re: software breakpoints disappearing/reappearing in	KVM/qemu
Date: Sun, 10 Apr 2011 17:16:10 +0200	[thread overview]
Message-ID: <4DA1C9BA.7070206@web.de> (raw)
In-Reply-To: <4DA1C194.2000005@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]

On 2011-04-10 16:41, Avi Kivity wrote:
> On 04/10/2011 05:23 PM, Jan Kiszka wrote:
>> On 2011-04-10 16:01, Avi Kivity wrote:
>> >  On 04/08/2011 11:52 PM, Jan Kiszka wrote:
>> >>  QEMU's gdbstub in KVM mode is simply not designed to account for
>> guests
>> >>  swapping out code pages that contain breakpoints. Due to the fact
>> that
>> >>  the Linux kernel does not do these weird things to its own code,
>> >
>> >  It actually happily patches its own code at certain circumstances.  If
>> >  you debug early boot or suspend/resume or cpu hotplug you're likely to
>> >  encounter them.
>>
>> Yes, it patches (alternates, jump_labels, mcount etc.), but it doesn't
>> swap or move code pages. At least so far.
>>
> 
> Try using modules (though that's different - the virtual addresses will
> change too).  Or debugging a mixed kernel/user workload.

Modules don't go unexpectedly. Once they are loaded, they can perfectly
be debugged just like kernel code. Debugging init code requires care to
avoid leaving breakpoints behind in to-be-removed sections.

But that's not comparable to swapping. For that reason, debugging user
code via the gdbstub was always discouraged (and it's unneeded in 99% of
the time as such targets come with their own debugger).

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

      reply	other threads:[~2011-04-10 15:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 18:50 [Qemu-devel] software breakpoints disappearing/reappearing in KVM/qemu Craig Brozefsky
2011-04-08 20:16 ` Blue Swirl
2011-04-08 20:37   ` Craig Brozefsky
2011-04-08 20:52 ` [Qemu-devel] " Jan Kiszka
2011-04-10 14:01   ` Avi Kivity
2011-04-10 14:23     ` Jan Kiszka
2011-04-10 14:41       ` Avi Kivity
2011-04-10 15:16         ` Jan Kiszka [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=4DA1C9BA.7070206@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=craig@red-bean.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).