aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2012-07-19 12:48:17 +0000
committerYao Qi <yao@codesourcery.com>2012-07-19 12:48:17 +0000
commit6ace3df1ec836a2c7aaabbd32877229757fae412 (patch)
treec9a18d6b62815ab120b435221b3b0c0413634527 /gdb/infcmd.c
parentf1415016b687b6b9d1f5c53c91036f8a565b2c52 (diff)
downloadgdb-6ace3df1ec836a2c7aaabbd32877229757fae412.zip
gdb-6ace3df1ec836a2c7aaabbd32877229757fae412.tar.gz
gdb-6ace3df1ec836a2c7aaabbd32877229757fae412.tar.bz2
* cli/cli-setshow.c (do_setshow_command): Handle case 'var_filename'
and case 'var_optional_filename' together. * infcmd.c (_initialize_infcmd): Call add_setshow_string_noescape_cmd instead of add_setshow_optional_filename_cmd for setshow command 'args'. Set completer for 'set args'. gdb/testsuite: * gdb.base/setshow.exp: Test 'set args ~'.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 475ac90..635e577 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -2918,6 +2918,7 @@ _initialize_infcmd (void)
{
static struct cmd_list_element *info_proc_cmdlist;
struct cmd_list_element *c = NULL;
+ char *cmd_name;
/* Add the filename of the terminal connected to inferior I/O. */
add_setshow_filename_cmd ("inferior-tty", class_run,
@@ -2930,14 +2931,18 @@ Usage: set inferior-tty /dev/pts/1"),
&setlist, &showlist);
add_com_alias ("tty", "set inferior-tty", class_alias, 0);
- add_setshow_optional_filename_cmd ("args", class_run,
- &inferior_args_scratch, _("\
+ cmd_name = "args";
+ add_setshow_string_noescape_cmd (cmd_name, class_run,
+ &inferior_args_scratch, _("\
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."),
- set_args_command,
- show_args_command,
- &setlist, &showlist);
+ set_args_command,
+ show_args_command,
+ &setlist, &showlist);
+ c = lookup_cmd (&cmd_name, setlist, "", -1, 1);
+ gdb_assert (c != NULL);
+ set_cmd_completer (c, filename_completer);
c = add_cmd ("environment", no_class, environment_info, _("\
The environment to give the program, or one variable's value.\n\