From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21600 invoked by alias); 27 Jan 2003 02:02:24 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21470 invoked from network); 27 Jan 2003 02:02:24 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 27 Jan 2003 02:02:24 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18d0UL-00025w-00 for ; Sun, 26 Jan 2003 22:03:14 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18cybp-0003ev-00 for ; Sun, 26 Jan 2003 21:02:49 -0500 Date: Mon, 27 Jan 2003 02:02:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: RFC: Demangle partial symbols and save memory too Message-ID: <20030127020249.GA14042@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <20030126222808.GA18132@nevyn.them.org> <200301270155.RAA15381@otisco.McKusick.COM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200301270155.RAA15381@otisco.McKusick.COM> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-01/txt/msg00728.txt.bz2 On Sun, Jan 26, 2003 at 05:55:22PM -0800, Paul N. Hilfinger wrote: > > > This also lets us uniquely share the symbol names between msyms, psyms, and > > full symbols. More memory savings, and we get the demangling for free. > > While you're in there merging symbol strings, perhaps you can explain > this code from stabsread.c (there might be similar code for other > readers; I haven't looked): In define_symbol, handling of 'T' case: > > > if (TYPE_TAG_NAME (SYMBOL_TYPE (sym)) == 0) > TYPE_TAG_NAME (SYMBOL_TYPE (sym)) > = obconcat (&objfile->type_obstack, "", "", SYMBOL_NAME (sym)); > > Why can't just SYMBOL_NAME (sym) be used for the TYPE_TAG_NAME value? At a guess, the theory is because SYMBOL_NAME is on the symbol_obstack and we can discard symbols when we can't necessarily discard types - if I remember right, there's some other problems that interfere with discarding types when we discard an objfile. As I said, that's just a guess. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer