From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29573 invoked by alias); 16 Dec 2003 16:54:58 -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 29566 invoked from network); 16 Dec 2003 16:54:57 -0000 Received: from unknown (HELO hawaii.kealia.com) (209.3.10.89) by sources.redhat.com with SMTP; 16 Dec 2003 16:54:57 -0000 Received: by hawaii.kealia.com (Postfix, from userid 2049) id 14861C6C0; Tue, 16 Dec 2003 08:54:57 -0800 (PST) To: gdb-patches@sources.redhat.com Subject: [rfa] add DMGL_PARAMS (was: new demangler) References: <20031215225452.GA23169@nevyn.them.org> <20031216053022.GA28127@nevyn.them.org> From: David Carlton Date: Tue, 16 Dec 2003 16:54:00 -0000 In-Reply-To: <20031216053022.GA28127@nevyn.them.org> (Daniel Jacobowitz's message of "Tue, 16 Dec 2003 00:30:22 -0500") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-12/txt/msg00389.txt.bz2 On Tue, 16 Dec 2003 00:30:22 -0500, Daniel Jacobowitz said: > On Mon, Dec 15, 2003 at 03:38:28PM -0800, David Carlton wrote: >> Okay; I'll just stick in the DMGL_PARAMS for now, then - my tests >> start passing again with that change. (Or I could rewrite the code >> that parses the output to not look for parentheses, I suppose.) > Do the former for now. The latter actually should be easy enough given the parsing functionality that's already in cp-support.c, but I have no objection to the former, which I present here. Is it okay for mainline? Tested on i686-pc-linux-gnu, GCC 3.2, DWARF 2; no regressions. (No tests, but it's necessary for my current patch awaiting approval to work properly.) David Carlton carlton@kealia.com 2003-12-16 David Carlton * cp-support.c (class_name_from_physname): Add DMGL_PARAMS. (method_name_from_physname): Ditto. Index: cp-support.c =================================================================== RCS file: /cvs/src/src/gdb/cp-support.c,v retrieving revision 1.10 diff -u -p -r1.10 cp-support.c --- cp-support.c 5 Dec 2003 04:25:09 -0000 1.10 +++ cp-support.c 16 Dec 2003 16:52:10 -0000 @@ -145,7 +145,7 @@ class_name_from_physname (const char *ph char *ret = NULL; const char *end; int depth = 0; - char *demangled_name = cplus_demangle (physname, DMGL_ANSI); + char *demangled_name = cplus_demangle (physname, DMGL_ANSI | DMGL_PARAMS); if (demangled_name == NULL) return NULL; @@ -170,7 +170,7 @@ method_name_from_physname (const char *p char *ret = NULL; const char *end; int depth = 0; - char *demangled_name = cplus_demangle (physname, DMGL_ANSI); + char *demangled_name = cplus_demangle (physname, DMGL_ANSI | DMGL_PARAMS); if (demangled_name == NULL) return NULL;