This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Switch to demangle ObjC symbols in maint.c
- From: Adam Fedor <fedor at doc dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 19 Nov 2002 08:32:42 -0700
- Subject: [PATCH] Switch to demangle ObjC symbols in maint.c
- Organization: Digital Optics Corp.
This is a very simple patch to allow languages other than C to be demangled.
2002-11-19 Adam Fedor <fedor@gnu.org>
* gdb/maint.c (maintenance_demangle): Add switch to demangle
other language's symbols.
Index: maint.c
===================================================================
RCS file: /cvs/src/src/gdb/maint.c,v
retrieving revision 1.28
diff -u -r1.28 maint.c
--- maint.c 18 Sep 2002 23:53:51 -0000 1.28
+++ maint.c 19 Nov 2002 15:27:31 -0000
@@ -151,7 +151,17 @@
}
else
{
- demangled = cplus_demangle (args, DMGL_ANSI | DMGL_PARAMS);
+ switch (current_language->la_language)
+ {
+ case language_objc:
+ /* Commented out until ObjC handling is enabled. */
+ /* demangled = objc_demangle (args); */
+ /* break; */
+ case language_cplus:
+ default:
+ demangled = cplus_demangle (args, DMGL_ANSI | DMGL_PARAMS);
+ break;
+ }
if (demangled != NULL)
{
printf_unfiltered ("%s\n", demangled);
@@ -651,7 +661,7 @@
"Commands for use by GDB maintainers.\n\
Includes commands to dump specific internal GDB structures in\n\
a human readable form, to cause GDB to deliberately dump core,\n\
-to test internal functions such as the C++ demangler, etc.",
+to test internal functions such as the C++/ObjC demangler, etc.",
&maintenancelist, "maintenance ", 0,
&cmdlist);
@@ -713,7 +723,7 @@
&maintenancelist);
add_cmd ("demangle", class_maintenance, maintenance_demangle,
- "Demangle a C++ mangled name.\n\
+ "Demangle a C++/ObjC mangled name.\n\
Call internal GDB demangler routine to demangle a C++ link name\n\
and prints the result.",
&maintenancelist);