aboutsummaryrefslogtreecommitdiff
path: root/gdb/demangle.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-02-21 04:31:59 +0000
committerAndrew Cagney <cagney@redhat.com>2005-02-21 04:31:59 +0000
commit7ab044018aac127cb2867aadf8faa4a3a2e46142 (patch)
tree9bed9e14cf7de9e50d165b8178bafbedc47120b4 /gdb/demangle.c
parent78f5381d69fee5c3fc74a2358267b425190cad54 (diff)
downloadgdb-7ab044018aac127cb2867aadf8faa4a3a2e46142.zip
gdb-7ab044018aac127cb2867aadf8faa4a3a2e46142.tar.gz
gdb-7ab044018aac127cb2867aadf8faa4a3a2e46142.tar.bz2
2005-02-20 Andrew Cagney <cagney@gnu.org>
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.
Diffstat (limited to 'gdb/demangle.c')
-rw-r--r--gdb/demangle.c21
1 files changed, 13 insertions, 8 deletions
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 **) &current_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 **) &current_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);