From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17156 invoked by alias); 10 May 2007 15:24:45 -0000 Received: (qmail 17137 invoked by uid 22791); 10 May 2007 15:24:44 -0000 X-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_50,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, 10 May 2007 15:24:39 +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 l4AFKxWC010488 for ; Thu, 10 May 2007 11:24:37 -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 l4AE5kqR013180; Thu, 10 May 2007 10:05:46 -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 l4AE5j8p016366; Thu, 10 May 2007 10:05:45 -0400 Message-ID: <464326BB.2040706@redhat.com> Date: Thu, 10 May 2007 18:38:00 -0000 From: Andrew Cagney User-Agent: Thunderbird 1.5.0.10 (X11/20070301) MIME-Version: 1.0 To: Adam Jocksch CC: Sami Wagiaalla , frysk Subject: Re: Proposed frysk.rt.Display References: <46420C75.6040401@redhat.com> <464214BD.2010908@redhat.com> <464216C7.10503@redhat.com> In-Reply-To: <464216C7.10503@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/msg00141.txt.bz2 Adam, This is a good summary, even the text to put at the top of the task as the description :-) First thing I think we've identified is that frysk.value.Variable is misleading, should be renamed to .Value -- compiler people are familar with lval and rval as extensions of that :-) It also leads to things like getRegisterVariable -> getRegisterValue - more sane :-) That leaves Variable for you and sami to fight over. I wonder though if for this object, something like VariableMonitor, or VariableTracker will be more meaningful. Anyway, the technical challenge here, I think, is defining the test-cases that are needed to push this object through each of its possible state transitions. I put it that way as, that way the test-cases define the objects requirements through hard evidence - and we don't end up with code that probably isn't needed. So, assuming for now that there's .getValue(), and a constructor, the most basic of tests would be, given: int x = 0; x = 1; // breakpoint #1 x = 2; // breakpoint #2 run to breakpoint 1, create the object, continue to breakpoint #2, check the object changed. With this unit test running we can then start to expand the cases this code needs to cover. -- A side line here, the obvious way to implement this is by creating high-level FileLineBreakpoint()s using hard-wired addresses. Lets be a little inovative though :-) Instead why not add to frysk.testbed code to find a pattern given a file (perhaps there's a library method available), and then create a FilePatternBreakpoint instead for instance, something like: new FilePatternBreakpoint(new File(getSrcDir(), "path-to.c"), "x = 1;") going forward I think this will greatly simplify the authoring and clarity of these tests. Andrew Adam Jocksch wrote: > Sami Wagiaalla wrote: >> Can you provide more context here please. >> What is the problem the proposed Display object is solving ? >> > The problem is that a Variable object has no concept of when it is in > or out of scope, as well as when it changes from being in memory to > being in a register. The Display class will act as a sort of > intermediary between Variable and classes that wish to access > Variables (such as variable watches in the source window), such that > they will not need to worry about checking whether the variable is > still in scope, in memory or in a register, etc.