lang = current_language;
gdb::unique_xmalloc_ptr<char> demangled
- = language_demangle (lang, name, DMGL_ANSI | DMGL_PARAMS);
+ = lang->demangle_symbol (name, DMGL_ANSI | DMGL_PARAMS);
if (demangled != NULL)
gdb_printf ("%s\n", demangled.get ());
else
return 0;
}
-/* Return demangled language symbol, or NULL.
- FIXME: Options are only useful for certain languages and ignored
- by others, so it would be better to remove them here and have a
- more flexible demangler for the languages that need it.
- FIXME: Sometimes the demangler is invoked when we don't know the
- language, so we can't use this everywhere. */
-gdb::unique_xmalloc_ptr<char>
-language_demangle (const struct language_defn *current_language,
- const char *mangled, int options)
-{
- if (current_language != NULL)
- return current_language->demangle_symbol (mangled, options);
- return NULL;
-}
-
/* Return information about whether TYPE should be passed
(and returned) by reference at the language level. */
extern CORE_ADDR skip_language_trampoline (frame_info_ptr, CORE_ADDR pc);
-/* Return demangled language symbol, or NULL. */
-extern gdb::unique_xmalloc_ptr<char> language_demangle
- (const struct language_defn *current_language,
- const char *mangled, int options);
-
/* Return information about whether TYPE should be passed
(and returned) by reference at the language level. */
struct language_pass_by_ref_info language_pass_by_reference (struct type *type);
else
{
gdb::unique_xmalloc_ptr<char> demangled
- = language_demangle (language_def (lang), name, arg_mode);
+ = language_def (lang)->demangle_symbol (name, arg_mode);
gdb_puts (demangled ? demangled.get () : name, stream);
}
}