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/infcmd.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/infcmd.c')
-rw-r--r-- | gdb/infcmd.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 807db80..f04dc8a 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -250,8 +250,10 @@ notice_args_set (char *args, int from_tty, struct cmd_list_element *c) /* Notice when `show args' is run. */ static void -notice_args_read (char *args, int from_tty, struct cmd_list_element *c) +notice_args_read (struct ui_file *file, int from_tty, + struct cmd_list_element *c, const char *value) { + deprecated_show_value_hack (file, from_tty, c, value); /* Might compute the value. */ get_inferior_args (); } @@ -1980,15 +1982,14 @@ _initialize_infcmd (void) _("Set terminal for future runs of program being debugged.")); set_cmd_completer (c, filename_completer); - c = add_set_cmd ("args", class_run, var_string_noescape, - (char *) &inferior_args, - "Set argument list to give program being debugged when it is started.\n\ -Follow this command with any number of args, to be passed to the program.", - &setlist); - set_cmd_completer (c, filename_completer); - set_cmd_sfunc (c, notice_args_set); - c = deprecated_add_show_from_set (c, &showlist); - set_cmd_sfunc (c, notice_args_read); + add_setshow_optional_filename_cmd ("args", class_run, + &inferior_args, _("\ +Set argument list to give program being debugged when it is started."), _("\ +Show argument list to give program being debugged when it is started."), _("\ +Follow this command with any number of args, to be passed to the program."), + notice_args_set, + notice_args_read, + &setlist, &showlist); c = add_cmd ("environment", no_class, environment_info, _("\ The environment to give the program, or one variable's value.\n\ |