From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1874 invoked by alias); 6 Jul 2007 19:38:09 -0000 Received: (qmail 1864 invoked by uid 22791); 6 Jul 2007 19:38:08 -0000 X-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,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; Fri, 06 Jul 2007 19:38:04 +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 l66Jc2IC001526 for ; Fri, 6 Jul 2007 15:38:02 -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 l66Jc0ac002639; Fri, 6 Jul 2007 15:38:00 -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 l66JbwJw015556; Fri, 6 Jul 2007 15:37:58 -0400 Message-ID: <468E9A23.7060806@redhat.com> Date: Fri, 06 Jul 2007 19:38: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: Re: frysk.rt.SteppingEngine poking at a task's blocker list? References: <468D5D0C.10505@redhat.com> <468E4BFB.5010604@redhat.com> In-Reply-To: <468E4BFB.5010604@redhat.com> 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/msg00045.txt.bz2 Tim Moore wrote: >> 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. >> > I was going on the theory that it would be better to not have to > interact with the stepping engine when setting breakpoints. I see below > that you're after the same thing, which we talked about, so I'm > surprised that you want breakpoints to depend on the stepping engine at all. > > That's the right approach; it just needs to be taken a little bit further: -> low-level CodeObserver, implemented by frysk.proc -> the high-level Breakpoint, as you've implemented, sub-classes providing ElfBreakpoints, File/Line breakpoints, DebugInfoBreakpoint and so on => the monitor can use these, as can code implementing ltrace => tests such as for the Display can also use those low-level breakpoints without getting involved with => in the case of the hpd and/or debug-window >> 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. >> >> > > Should the stepping engine be able to step from/over any blocker, or > only breakpoints? > Only user level breakpoints; other components, such as a monitor logger breakpoint, are not visible. This is all heavily reliant on the underlying .proc code consistently reporting breakpoints so that they can also be handled by the state machine; for instance: => step onto a breakpoint The breakpoint fires (even though it hasn't actually executed) and notifies the stepper that it is blocking the thread. The next step unblocks that breakpoint and re-steps => step-over over a function that has a breakpoint => step-over a line containing an embedded breakpoint The breakpoint causes the stepping engine to stop (but an option to override this would be nice); the main thing is that the user breakpoint notifies the stepping engine so that the stepping engine can make a decision. Andrew