From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23509 invoked by alias); 27 Jul 2007 15:53:25 -0000 Received: (qmail 23431 invoked by uid 22791); 27 Jul 2007 15:53:24 -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, 27 Jul 2007 15:53: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 l6RFrKGv019954 for ; Fri, 27 Jul 2007 11:53: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 l6RFrKiL010246 for ; Fri, 27 Jul 2007 11:53:20 -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 l6RFrIH2020751; Fri, 27 Jul 2007 11:53:18 -0400 Message-ID: <46AA1512.3040908@redhat.com> Date: Fri, 27 Jul 2007 15:53:00 -0000 From: Andrew Cagney User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: Stan Cox CC: Frysk List Subject: Re: dereferencing pointers from frysk.value References: <1185548524.11775.27.camel@multics.rdu.redhat.com> In-Reply-To: <1185548524.11775.27.camel@multics.rdu.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/msg00212.txt.bz2 So at present a "pointer" value is seen as a pair: type: pointer->char location: byte-buffer with size==sizeof(void*) and contents=="pointer value" and there's nothing for the "pointer" to point into? It sounds like the Type.toPrint() method should be parameterised with not just the ByteBuffer containing the value, but also the address space or segment[s] to which that value could refer. As an aside, the toPrint method should probably also be parameterized with a base-type formatter so that <> gives <<{ 0x123, 0x456 }>> with these, PrintValue is reduced to: BaseTypeWriter baseTypeWriter = select writer based on -format Value result = cli.parseValue(expression); result.toPrint(outputWriter, task.getMemory(), baseTypeWriter) Andrew For the case of memory, Stan Cox wrote: > Currently a class is essentially a list of types and a ByteBuffer of the > class contents. It might be nice to dereference a pointer if the > pointer's type is char* and display the string. However ClassType just > has a pointer, no task to do a task.getMemory() on. DebugInfo has that > information. Any suggestions on a nice way to handle this? > > >