From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ErWgj-00057v-TC for qemu-devel@nongnu.org; Wed, 28 Dec 2005 03:29:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ErWgh-00057a-Dg for qemu-devel@nongnu.org; Wed, 28 Dec 2005 03:29:36 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ErWgg-00057V-Tn for qemu-devel@nongnu.org; Wed, 28 Dec 2005 03:29:35 -0500 Received: from [66.54.152.27] (helo=jive.SoftHome.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1ErWgp-0003ps-Ds for qemu-devel@nongnu.org; Wed, 28 Dec 2005 03:29:43 -0500 From: Mulyadi Santosa Subject: Re: [Qemu-devel] [PATCH] Fix to gdb - wrong translation block invalidated when setting gdb breakpoints Date: Wed, 28 Dec 2005 15:22:35 +0700 References: <16af12af0512231157n4efb01eemd4afbca65dea9d4@mail.gmail.com> In-Reply-To: <16af12af0512231157n4efb01eemd4afbca65dea9d4@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512281522.35505.a_mulyadi@softhome.net> Reply-To: a_mulyadi@softhome.net, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Andre Pech Hello Andre.... > breakpoint was hit. I finally tracked down the problem to > exec.c:breakpoint_invalidate. The problem is that > breakpoint_invalidate, which is supposed to invalidate the > translation block for the address you want to break at, was > actualling invalidating the translation block for the base address of > the page that contained your breakpoint address. The fix is actually > very simple and is attached below. Thanks for the patch :) I will test the patch ASAP. Anyway, while the fix seems "simple", I am sure it wasn't easy to track down the real problem. Checking briefly (by eye, not via debugger or tons of printf() ), one will skip those lines because he/she will think the function is invalidating the correct physical address (returned cpu_get_phys_page_debug() ). Great work! NB: Althought it is a bit late, but it's never too late...Merry Christmast! regards Mulyadi