aboutsummaryrefslogtreecommitdiff
path: root/gdb/maint.c
diff options
context:
space:
mode:
authorAdam Fedor <fedor@gnu.org>2002-12-24 03:57:58 +0000
committerAdam Fedor <fedor@gnu.org>2002-12-24 03:57:58 +0000
commit5a24b7e3b57e4ff4e2cded1c56f32d02c377d2e2 (patch)
treeb1e34541726fb6fa0062be454911e2308d33ec47 /gdb/maint.c
parent213e90f4835f1309a968791d93e91fcbcf6ba1b2 (diff)
downloadbinutils-5a24b7e3b57e4ff4e2cded1c56f32d02c377d2e2.zip
binutils-5a24b7e3b57e4ff4e2cded1c56f32d02c377d2e2.tar.gz
binutils-5a24b7e3b57e4ff4e2cded1c56f32d02c377d2e2.tar.bz2
maint.c (maintenance_demangle): Add switch to demangle
ObjC language symbols as well.
Diffstat (limited to 'gdb/maint.c')
-rw-r--r--gdb/maint.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/gdb/maint.c b/gdb/maint.c
index 92f9a16..db7d42d 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -151,7 +151,17 @@ maintenance_demangle (char *args, int from_tty)
}
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 @@ _initialize_maint_cmds (void)
"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 @@ Cause GDB to behave as if an internal warning was reported.",
&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);