From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28469 invoked by alias); 2 Nov 2004 15:14:12 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 28459 invoked from network); 2 Nov 2004 15:14:10 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 2 Nov 2004 15:14:10 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id iA2FE0ir009455 for ; Tue, 2 Nov 2004 10:14:10 -0500 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id iA2FE0r20479; Tue, 2 Nov 2004 10:14:00 -0500 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id A359D129D8C; Tue, 2 Nov 2004 10:13:25 -0500 (EST) Message-ID: <4187A414.5060804@gnu.org> Date: Tue, 02 Nov 2004 15:14:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: a value has-a location Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-11/txt/msg00015.txt.bz2 (back to this one again) We've the relationship: LOCATION ----<> VALUE <>----- TYPE . /_\ | +-------------------------. | | DWARF-2 LOCATION LEGACY LOCATION That is: A VALUE has-a TYPE and a LOCATION. The LOCATION describing how to obtain the BITS and BYTES belonging to the value (but may not actually contan those bits and bytes). LOCATION could have methods such as: int read (offset, length, readbuf) -- read at least some of the bytes void read_full (offset, length, writebuf) -- read all the bytes, or throw an error int io (offset, length, readbuf, writebuf) and perhaphs: iterate-over-pieces (method) -- call method with each register/memory piece -- needed by watchpoints A DWARF-2 LOCATION would be implemented using the DWARF-2 code. A LEGACY LOCATION would accomodate the old more explicit way of doing things. It is this that will replace VALUE_CONTENTS{,_RAW} et.al. I intend refactoring ``struct value'' so that there is an explicit location object (at present it's a union :-/). Initially it will probably remain in ``struct value''. Once the location has been separated out we can look at making it virtual with separate dwarf-2 and legacy locations. comments? Andrew