From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24199 invoked by alias); 5 Jul 2007 21:05:18 -0000 Received: (qmail 24182 invoked by uid 22791); 5 Jul 2007 21:05:17 -0000 X-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_05,DK_POLICY_SIGNSOME,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 05 Jul 2007 21:05:10 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l65L58m7029108 for ; Thu, 5 Jul 2007 17:05:08 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l65L56Er020091; Thu, 5 Jul 2007 17:05:06 -0400 Received: from [127.0.0.1] (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l65L55Je030465; Thu, 5 Jul 2007 17:05:05 -0400 Message-ID: <468D5D0C.10505@redhat.com> Date: Thu, 05 Jul 2007 21:05:00 -0000 From: Andrew Cagney User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: Tim Moore , Mike Cvet CC: frysk@sourceware.org Subject: frysk.rt.SteppingEngine poking at a task's blocker list? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00040.txt.bz2 Tim, Mike, I noticed this in frysk.rt.SteppingEngine: /** * Unblock a task so that, from the point of view of the stepping * engine, execution can continue. For now this unblocks * instruction observers and code observers for breakpoints, but * ultimately I (timoore) think it should unblock all blockers. */ public boolean continueForStepping(Task task, boolean unblockStepper) { if (unblockStepper) { task.requestUnblock(this.steppingObserver); } TaskObserver[] blockers = (TaskObserver [])task.getBlockers().clone(); for (int j = 0; j < blockers.length; j++) { // One of ours? if (blockers[j] instanceof Breakpoint) { task.requestUnblock(blockers[j]); } else { // Some blocker that we don't know about // System.out.println("Unknown blocker " + blockers[j].toString()); // return false; } } return true; } I'm not sure what is happening here, but the underlying code should operate as: -> process hits a breakpoint instruction -> all low-level CodeObservers fire -> all corresponding high-level Breakpoint observers fire -> Breakpoint observers each notify Stepping engine to stop (accompanied by corresponding low-level CodeObserver doing the block) This will leave the SteppingEngine with a full list of CodeObservers to unblock without needing to poke around an assumed live task's internal state. The flexibility of this approach also lets us write custom high-level breakpoint observers, in the monitor say, that can be implemented using just the Breakpoint and its shared-library Manager, and not have to worry about the stepping engine at all. Andrew PS: And it prevents me moving this blockers stuff into frysk.proc.live :-( :-)