From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53404 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8wN4-0001ni-UB for qemu-devel@nongnu.org; Sun, 10 Apr 2011 11:16:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q8wN2-0001Nb-O9 for qemu-devel@nongnu.org; Sun, 10 Apr 2011 11:16:14 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:37510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q8wN2-0001NI-Bv for qemu-devel@nongnu.org; Sun, 10 Apr 2011 11:16:12 -0400 Message-ID: <4DA1C9BA.7070206@web.de> Date: Sun, 10 Apr 2011 17:16:10 +0200 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: software breakpoints disappearing/reappearing in KVM/qemu References: <4D9F7597.7020604@web.de> <4DA1B81C.8000506@redhat.com> <4DA1BD64.6000108@web.de> <4DA1C194.2000005@redhat.com> In-Reply-To: <4DA1C194.2000005@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigCFE74E53474C878EF2BBC441" Sender: jan.kiszka@web.de List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org, Craig Brozefsky This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigCFE74E53474C878EF2BBC441 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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. >> >=20 > 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 --------------enigCFE74E53474C878EF2BBC441 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk2hyboACgkQitSsb3rl5xQPeQCg6mjDXbcHvn1oQMoJBAcAVhmf oo0An1yaKtb4PM8U24ZAG65LPpVDx9QA =jS70 -----END PGP SIGNATURE----- --------------enigCFE74E53474C878EF2BBC441--