From 7ab044018aac127cb2867aadf8faa4a3a2e46142 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Mon, 21 Feb 2005 04:31:59 +0000 Subject: 2005-02-20 Andrew Cagney Use add_setshow_enum_cmd through out. * arch-utils.c, charset.c, demangle.c, i386-tdep.c: Update. * infrun.c, mips-tdep.c, osabi.c, serial.c, tui/tui-win.c: Update. --- gdb/demangle.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'gdb/demangle.c') diff --git a/gdb/demangle.c b/gdb/demangle.c index 2e5df28..a95227b 100644 --- a/gdb/demangle.c +++ b/gdb/demangle.c @@ -189,14 +189,19 @@ _initialize_demangler (void) demangling_style_names[i] = xstrdup (libiberty_demanglers[i].demangling_style_name); - set = add_set_enum_cmd ("demangle-style", class_support, - demangling_style_names, - (const char **) ¤t_demangling_style_string, - "Set the current C++ demangling style.\n\ -Use `set demangle-style' without arguments for a list of demangling styles.", - &setlist); - show = deprecated_add_show_from_set (set, &showlist); - set_cmd_sfunc (set, set_demangling_command); + /* FIXME: cagney/2005-02-20: The code implementing this variable are + malloc-ing and free-ing current_demangling_style_string when it + should instead just point to an element of + demangling_style_names. */ + add_setshow_enum_cmd ("demangle-style", class_support, + demangling_style_names, + (const char **) ¤t_demangling_style_string, _("\ +Set the current C++ demangling style."), _("\ +Show the current C++ demangling style."), _("\ +Use `set demangle-style' without arguments for a list of demangling styles."), + set_demangling_command, + NULL, /* FIXME: i18n: */ + &setlist, &showlist); /* Set the default demangling style chosen at compilation time. */ set_demangling_style (DEFAULT_DEMANGLING_STYLE); -- cgit v1.1