This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[rfa] add DMGL_PARAMS (was: new demangler)


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]