From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13313 invoked by alias); 10 Mar 2004 15:04:45 -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 13304 invoked from network); 10 Mar 2004 15:04:44 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 10 Mar 2004 15:04:44 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i2AF4i09001248 for ; Wed, 10 Mar 2004 10:04:44 -0500 Received: from zenia.home.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i2AF4f802800; Wed, 10 Mar 2004 10:04:42 -0500 To: gdb-patches@sources.redhat.com CC: Daniel Jacobowitz , david carlton Subject: Re: [RFA] minsyms.c: Fix switching to GNU v3 ABI References: <20040310105709.GJ25204@cygbert.vinschen.de> From: Jim Blandy Date: Wed, 10 Mar 2004 15:04:00 -0000 In-Reply-To: <20040310105709.GJ25204@cygbert.vinschen.de> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-03.o/txt/msg00229.txt Message-ID: <20040310150400.ZGGbzurG48PSaDM0u_JoGdJTY3h1-lzkWoWPSVPU2vY@z> Corinna Vinschen writes: > Corinna > > * minsyms.c (install_minimal_symbols): Create demangled names > for all msymbol entries. > > Index: minsyms.c > =================================================================== > RCS file: /cvs/src/src/gdb/minsyms.c,v > retrieving revision 1.41 > diff -u -p -r1.41 minsyms.c > --- minsyms.c 9 Feb 2004 19:13:46 -0000 1.41 > +++ minsyms.c 10 Mar 2004 10:55:25 -0000 > @@ -924,6 +924,8 @@ install_minimal_symbols (struct objfile > mixing ABIs then the user will need to "set cp-abi" > manually. */ > const char *name = SYMBOL_LINKAGE_NAME (&objfile->msymbols[i]); > + SYMBOL_SET_NAMES (&objfile->msymbols[i], name, strlen (name), > + objfile); > if (name[0] == '_' && name[1] == 'Z' > && SYMBOL_DEMANGLED_NAME (&objfile->msymbols[i]) != NULL) > { It would be nice to get the C++ guys' opinion of this, but it's my understanding that demangling all symbols contributes a substantial amount of time to the startup, and can consume very large amounts of memory when debugging large C++ programs. If you were to move the use of SYMBOL_SET_NAMES inside the if, after the check for the "_Z" prefix but (obviously) before the use of SYMBOL_DEMANGLED_NAME, then we'd only try to demangle suspicious-looking names, and we'd stop after successfully demangling at most one.