From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29006 invoked by alias); 18 Jun 2007 18:15:07 -0000 Received: (qmail 28995 invoked by uid 22791); 18 Jun 2007 18:15:06 -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; Mon, 18 Jun 2007 18:15:03 +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 l5IIF1Ch023960 for ; Mon, 18 Jun 2007 14:15:01 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l5IIF0dx030703 for ; Mon, 18 Jun 2007 14:15:00 -0400 Received: from to-dhcp0.toronto.redhat.com (to-dhcp0.toronto.redhat.com [172.16.14.100]) by pobox.toronto.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l5IIF0bX029052; Mon, 18 Jun 2007 14:15:00 -0400 Message-ID: <4676CBA2.5090506@redhat.com> Date: Mon, 18 Jun 2007 18:37:00 -0000 From: Mike Cvet User-Agent: Thunderbird 2.0.0.0 (X11/20070419) MIME-Version: 1.0 To: Adam Jocksch CC: frysk Subject: Re: New observer interface for SteppingEngine References: <4672EC0B.9050203@redhat.com> <46768C6B.9080609@redhat.com> <4676A722.8050503@redhat.com> In-Reply-To: <4676A722.8050503@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-q2/txt/msg00319.txt.bz2 Adam Jocksch wrote: > The problem is that the default Java observer interface doesn't > include much information as to the type of message received. Having a > custom interface will not add any extra overhead and it just seems > cleaner; the messages for tasks running and tasks stopping are > completely distinct. One of the issues I ran into with my code is that > I wasn't sure how to tell why the update method was being called. There's certainly nothing I could argue with here - the updates from the Java Observables aren't explicit - the Observer must make assumptions about what is coming through. But there are really only two cases of interest - the Task is stopped (do work), and the Task is not stopped (don't do any work). A null parameter for the former, and a Task parameter for the latter. I suppose you could compare it to a kind of toggle. I'm not sure what other kinds of messages would have to be passed through though? > With a custom observer interface it would be practically > self-documenting. It also seems a little strange to have to poll all > the tasks that we're interested in to see if they're stopped whenever > we receive an event via notifyNotBlocked when this information could > probably be send along with the message. You're right, when the Register/Memory/Disassembly windows become multithread-aware, something like that might be required. What if, instead of re-writing everything, the SteppingEngine passes a reference to a frysk.rt.TaskStepEngine through as an argument - which contains the Task in question, its current State, and other useful things like its Dwfl Object? - Mike