This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Compile objc-lang.c, objc-exp.tab.c [1/5]
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: Adam Fedor <fedor at doc dot com>, Daniel Jacobowitz <drow at mvista dot com>
- Cc: GDB Patches <gdb-patches at sources dot redhat dot com>
- Date: Thu, 20 Mar 2003 16:27:02 -0500
- Subject: Re: [RFA] Compile objc-lang.c, objc-exp.tab.c [1/5]
- References: <3E16093D.3070907@doc.com>
Daniel,
Would it be possible to make the cplus_demangle() method part of the
language vector? That way code like the patch below could be reduced to:
/* Return demangled language symbol, or NULL. */
language_demangle (current_language, arg);
This would in turn allow Adam to just add an equivalent objc_demangle()
method to the objc language vector, and hence eliminate the need to
always link in objc-lang.c.
Andrew
RCS file: /cvs/src/src/gdb/maint.c,v
retrieving revision 1.30
diff -u -p -r1.30 maint.c
--- maint.c 24 Dec 2002 03:57:58 -0000 1.30
+++ maint.c 3 Jan 2003 03:06:25 -0000
@@ -35,6 +35,7 @@
#include "symfile.h"
#include "objfiles.h"
#include "value.h"
+#include "objc-lang.h"
#include "cli/cli-decode.h"
@@ -154,9 +155,8 @@ maintenance_demangle (char *args, int fr
switch (current_language->la_language)
{
case language_objc:
- /* Commented out until ObjC handling is enabled. */
- /* demangled = objc_demangle (args); */
- /* break; */
+ demangled = objc_demangle (args);
+ break;
case language_cplus:
default:
demangled = cplus_demangle (args, DMGL_ANSI | DMGL_PARAMS);