This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[rfa] add DMGL_PARAMS (was: new demangler)
- From: David Carlton <carlton at kealia dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 16 Dec 2003 08:54:57 -0800
- Subject: [rfa] add DMGL_PARAMS (was: new demangler)
- References: <yf2llpdvgko.fsf@hawaii.kealia.com><20031215225452.GA23169@nevyn.them.org><yf2he01vg6z.fsf@hawaii.kealia.com> <m3y8tdfzir.fsf@gossamer.airs.com><yf2d6apvfg2.fsf@hawaii.kealia.com> <m3u141fz28.fsf@gossamer.airs.com><m3ptepfyxh.fsf@gossamer.airs.com> <yf28yldvevq.fsf@hawaii.kealia.com><m3he01fygc.fsf@gossamer.airs.com> <yf23cblveh7.fsf@hawaii.kealia.com><20031216053022.GA28127@nevyn.them.org>
On Tue, 16 Dec 2003 00:30:22 -0500, Daniel Jacobowitz <drow@mvista.com> 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 <carlton@kealia.com>
* 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;