From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2292 invoked by alias); 10 May 2003 19:01:18 -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 2239 invoked from network); 10 May 2003 19:01:18 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 10 May 2003 19:01:18 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19EZbE-0006Li-00; Sat, 10 May 2003 14:01:36 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19EZam-0003ux-00; Sat, 10 May 2003 15:01:08 -0400 Date: Sat, 10 May 2003 19:01:00 -0000 From: Daniel Jacobowitz To: David Carlton Cc: gdb Subject: Re: dwarves, hierarchies, and cross-references Message-ID: <20030510190108.GA15014@nevyn.them.org> Mail-Followup-To: David Carlton , gdb References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2003-05/txt/msg00188.txt.bz2 On Fri, May 09, 2003 at 04:14:18PM -0700, David Carlton wrote: > * Once we notice that we put E in the wrong context, update everybody > who has been misled by this. This seems complicated and potentially > fragile to me: exactly what data would we have to maintain to make > this work? Too fragile I think. > * When parsing E via a cross-reference, figure out its context, so we > can name it correctly. This seems like a plausible idea to me; I'm > only worried that it might be a little inefficient at times. Yes. We already read in the whole CU at a time and build the DIE structure in memory, and then walk the DIE structure to build types. All we have to do is increase the memory usage of the DIEs slightly by adding a backchain up the hierarchy. A simliar thing works for inter-CU references. Then we can walk up the chain looking for enclosing classes or namespaces, and get their names; and we have a DIE->name convertor. This requires some cleanup in the reader, but nothing revolutionary. We also need the context in some other places. For instance, to associate method implementations to method declarations; and for templates and inline functions. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer