diff options
author | Andrew Cagney <cagney@redhat.com> | 2005-02-21 03:25:56 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2005-02-21 03:25:56 +0000 |
commit | b4b4ac0b71ae756aa805f15a6f9b0c5b79d8f398 (patch) | |
tree | 51cb257042efabc97dc1b938400f93dc4b095103 /gdb/cli/cli-decode.c | |
parent | ac4528d236f87f0ca5a76199a2455f12101ab7f9 (diff) | |
download | gdb-b4b4ac0b71ae756aa805f15a6f9b0c5b79d8f398.zip gdb-b4b4ac0b71ae756aa805f15a6f9b0c5b79d8f398.tar.gz gdb-b4b4ac0b71ae756aa805f15a6f9b0c5b79d8f398.tar.bz2 |
2005-02-20 Andrew Cagney <cagney@gnu.org>
* cli/cli-decode.c (add_setshow_optional_filename_cmd): New
function.
* cli/cli-setshow.c (deprecated_show_value_hack)
(do_setshow_command): Handle var_optional_filename.
* command.h (enum var_types): Add var_optional_filename.
(add_setshow_optional_filename_cmd): Declare.
* infcmd.c (notice_args_read): Use.
Diffstat (limited to 'gdb/cli/cli-decode.c')
-rw-r--r-- | gdb/cli/cli-decode.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index ec2f734..f2a533c 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -536,6 +536,25 @@ add_setshow_string_noescape_cmd (char *name, enum command_class class, } /* Add element named NAME to both the set and show command LISTs (the + list for set/show or some sublist thereof). */ +void +add_setshow_optional_filename_cmd (char *name, enum command_class class, + char **var, + const char *set_doc, const char *show_doc, + const char *help_doc, + cmd_sfunc_ftype *set_func, + show_value_ftype *show_func, + struct cmd_list_element **set_list, + struct cmd_list_element **show_list) +{ + add_setshow_cmd_full (name, class, var_optional_filename, var, + set_doc, show_doc, help_doc, + set_func, show_func, + set_list, show_list, + NULL, NULL); +} + +/* Add element named NAME to both the set and show command LISTs (the list for set/show or some sublist thereof). CLASS is as in add_cmd. VAR is address of the variable which will contain the value. SET_DOC and SHOW_DOC are the documentation strings. */ |