From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23313 invoked by alias); 1 Jun 2007 16:17:31 -0000 Received: (qmail 23305 invoked by uid 22791); 1 Jun 2007 16:17:30 -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, 01 Jun 2007 16:17:22 +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 l51GHKND021012 for ; Fri, 1 Jun 2007 12:17:20 -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 l51GHJlu001526; Fri, 1 Jun 2007 12:17:19 -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 l51GHIJc031151; Fri, 1 Jun 2007 12:17:18 -0400 Message-ID: <4660468F.4060500@redhat.com> Date: Fri, 01 Jun 2007 19:05:00 -0000 From: Andrew Cagney User-Agent: Thunderbird 1.5.0.10 (X11/20070301) MIME-Version: 1.0 To: Sami Wagiaalla CC: frysk Subject: Re: ValueFactory References: <46603AE0.2020201@redhat.com> In-Reply-To: <46603AE0.2020201@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/msg00231.txt.bz2 With the below, a typical use will be: ValueFactory.getFactory(frame.task.proc).getValue ("a+2", frame) so short circuit that vis: ValueFactory static ValueFactory getFactory(Frame) Value getValue ("string"); ... same for die ... Andrew Sami Wagiaalla wrote: > Okay so here is a skeleton: > > // this takes care of the creation of Value object > public class ValueFactory{ > > public static ValueFactory getFactory(Proc){ > // check cache and return a ValueFactory > } > private ValueFactory(Proc proc){ > } > > public Value getValue(String name, Frame currentFrame){ > ... > } > > public Value getValue(DwarfDie die){ > ... } > > } > > // this is just speculation but can be put either in Value it self or > in a ValuePrint object > ... > public String printValue(Value value){ > } > ... > > How well will the above work for hpd, stack examination, source > window, DisplayVariable, an any other interested parties :) > > Sami