From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K2VuA-0006tn-1k for qemu-devel@nongnu.org; Sat, 31 May 2008 14:34:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K2Vu7-0006tP-SP for qemu-devel@nongnu.org; Sat, 31 May 2008 14:34:13 -0400 Received: from [199.232.76.173] (port=54826 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K2Vu7-0006tM-NA for qemu-devel@nongnu.org; Sat, 31 May 2008 14:34:11 -0400 Received: from relay4-v.mail.gandi.net ([217.70.178.78]:41083) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K2Vu7-00015o-JH for qemu-devel@nongnu.org; Sat, 31 May 2008 14:34:11 -0400 Message-ID: <484199DE.3080904@bellard.org> Date: Sat, 31 May 2008 20:33:02 +0200 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 0/5] Debugger enhancements References: <48414AC8.7080206@web.de> <484181C4.6080002@bellard.org> <200805311805.03739.paul@codesourcery.com> In-Reply-To: <200805311805.03739.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Reply-To: 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 Cc: Paul Brook Paul Brook wrote: >> 2) The current watchpoint code is not implemented correctly so it is not >> safe to improve it using the same system (IMHO it should not have been >> commited in its current state). A correct implementation should not >> delay the DEBUG exception. It should be implemented like the "normal" >> MMU exceptions. > > On most targets watchpoint traps occur after the instruction completes, so you > have to defer the DEBUG exception. > Normal MMU faults occur before the instruction completes. If this is the wanted behavior then the same system as the Self Modifying Code on x86 should be used. Basically it consists in doing as a MMU fault and single stepping one instruction after. Unfortunately I fear the implementation will be complicated. Fabrice.