static void maintenance_demangle (char *args, int from_tty) { char *demangled; if (args == NULL || *args == '\0') { printf_unfiltered (_("\"maintenance demangle\" takes " "an argument to demangle.\n")); } else { demangled = language_demangle (current_language, args, DMGL_ANSI | DMGL_PARAMS); if (demangled != NULL) { printf_unfiltered ("%s\n", demangled); xfree (demangled); } else { printf_unfiltered (_("Can't demangle \"%s\"\n"), args); } } }
static void maintenance_demangle(const char *args, int from_tty) { char *demangled; if (args == NULL || *args == '\0') { printf_unfiltered(_("\"maintenance demangle\" takes an argument to demangle.\n")); } else { /* APPLE LOCAL: Using language_demangle is wrong here, because this is a simple utility function, and should work in most cases even when the language is not correct... */ #if !(defined(__APPLE__) && defined(__APPLE_CC__)) demangled = language_demangle(current_language, args, (DMGL_ANSI | DMGL_PARAMS)); #endif /* !(__APPLE__ && __APPLE_CC__) */ switch (current_language->la_language) { case language_objc: demangled = objc_demangle(args, 0); break; case language_objcplus: demangled = objcplus_demangle(args, (DMGL_ANSI | DMGL_PARAMS)); break; case language_cplus: default: demangled = cplus_demangle(args, (DMGL_ANSI | DMGL_PARAMS)); break; } if (demangled != NULL) { printf_unfiltered("%s\n", demangled); xfree(demangled); } else { printf_unfiltered(_("Cannot demangle \"%s\"\n"), args); } } }