[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: software breakpoints disappearing/reappearing in KV
Re: [Qemu-devel] Re: software breakpoints disappearing/reappearing in KVM/qemu
Sun, 10 Apr 2011 17:16:10 +0200
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:184.108.40.206) Gecko/20080226 SUSE/220.127.116.11-1.1 Thunderbird/18.104.22.168 Mnenhy/0.7.5.666
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
>> >> swapping out code pages that contain breakpoints. Due to the fact
>> >> 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).
Description: OpenPGP digital signature