From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8917 invoked by alias); 22 Aug 2007 18:08:00 -0000 Received: (qmail 8503 invoked by uid 22791); 22 Aug 2007 18:07:57 -0000 X-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO X-Spam-Check-By: sourceware.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (83.160.170.119) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 22 Aug 2007 18:07:54 +0000 Received: from dijkstra.wildebeest.org ([192.168.1.29]) by gnu.wildebeest.org with esmtp (Exim 4.63) (envelope-from ) id 1INucF-0000kg-7P; Wed, 22 Aug 2007 20:07:40 +0200 Subject: Re: frysk-core/frysk/proc Breakpoint.java IsaIA32. ... From: Mark Wielaard To: Phil Muldoon Cc: frysk@sourceware.org In-Reply-To: <46CC5226.8040607@redhat.com> References: <20070115134847.31787.qmail@sourceware.org> <46CC5226.8040607@redhat.com> Content-Type: text/plain Date: Wed, 22 Aug 2007 18:08:00 -0000 Message-Id: <1187806056.3759.27.camel@dijkstra.wildebeest.org> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit X-Spam-Score: -4.3 (----) X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2007-q3/txt/msg00324.txt.bz2 Hi Phil, On Wed, 2007-08-22 at 10:11 -0500, Phil Muldoon wrote: > > Fixes bug #3676 > > * Breakpoint.java (stepDone): Only set if still installed. > > (isInstalled): new method. > > (toString): Prettify. > > * IsaIA32.java (isTaskStepped): Reset flag. > > * IsaX8664.java (isTaskStepped): Likewise. > > > As we talked about on irc, and in addition to looking at this code in > preparation for hardware watchpoints, can I make a small recommendation > here? > > isTaskStepped(task) is a query, and should imo not be altering any debug > registers after the fact. > > Can I propose a split into: > > isTaskStepped(task) and setTaskStepped(task) > > Does that make better sense? That does make sense. Although I don't know if someone really needs setTaskStepped(), so I wouldn't introduce it unless there was a real usage for it. The reason why the flag is reset here is mentioned in the original patch email: http://sourceware.org/ml/frysk/2007-q1/msg00024.html > There is one thing that changed in the semantics of Isa.isTaskStepped() > for x86 and x86_64 (and Ia32On64 has been added). That is that the > stepping flag in the d6 register is being reset because "[the d6] > register is never cleared by the processor and must be cleared by > software after the contents have been read". This means that we are now > doing a inferior visible change, but I don't see any way to get around > this. If the inferior would be using instruction stepping itself there > would be all kinds of interesting issues anyway. I do agree this might not be the most ideal place to reset this flag though. Maybe it should be moved into LinuxTask.sendContinue()? Cheers, Mark