aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2001-02-19 11:47:16 +0000
committerEli Zaretskii <eliz@gnu.org>2001-02-19 11:47:16 +0000
commitfa58ee119617c4302d6bf94ff751c3ee8e1062cd (patch)
treefa0ec2445538b681e9d27d997818528437e631a0 /gdb/infcmd.c
parentfb33b906916095eb3e0497bccbbb8017f9e4a4eb (diff)
downloadgdb-fa58ee119617c4302d6bf94ff751c3ee8e1062cd.zip
gdb-fa58ee119617c4302d6bf94ff751c3ee8e1062cd.tar.gz
gdb-fa58ee119617c4302d6bf94ff751c3ee8e1062cd.tar.bz2
* demangle.c (demangling_style_names): New variable.
(_initialize_demangler): Fill demangling_style_names with the names of known demangling styles from libiberty_demanglers[]. Use add_set_enum_cmd instead of add_set_cmd, to get completion on demangling style names. * proc-api.c (_initialize_proc_api): Make `procfs-file' use file-name completion. * remote-rdi.c (_initialize_remote_rdi): Ditto for `rdilogfile'. * solib.c (_initialize_solib): Ditto for `solib-search-path' and `solib-absolute-prefix'. * tracepoint.c (_initialize_tracepoint): Ditto for `save-tracepoints'. * win32-nat.c (_initialize_inftarg): Ditto for `dll-symbols'. * cli/cli-cmds.c (init_cli_cmds): Make `shell' and `make' use file-name completion. * infcmd.c (_initialize_infcmd): Make the following commands use the file-name completer: `tty', `args', `path', `paths', and `run'.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 5ae5c6a..b7642c7 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -40,6 +40,7 @@
#endif
#include "event-top.h"
#include "parser-defs.h"
+#include "completer.h"
/* Functions exported for general use: */
@@ -1794,16 +1795,17 @@ _initialize_infcmd (void)
{
struct cmd_list_element *c;
- add_com ("tty", class_run, tty_command,
- "Set terminal for future runs of program being debugged.");
+ c= add_com ("tty", class_run, tty_command,
+ "Set terminal for future runs of program being debugged.");
+ c->completer = filename_completer;
- add_show_from_set
- (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\
+ 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),
- &showlist);
+ &setlist);
+ add_show_from_set (c, &showlist);
+ c->completer = filename_completer;
c = add_cmd
("environment", no_class, environment_info,
@@ -1831,12 +1833,13 @@ This does not affect the program until the next \"run\" command.",
&setlist);
c->completer = noop_completer;
- add_com ("path", class_files, path_command,
- "Add directory DIR(s) to beginning of search path for object files.\n\
+ c = add_com ("path", class_files, path_command,
+ "Add directory DIR(s) to beginning of search path for object files.\n\
$cwd in the path means the current working directory.\n\
This path is equivalent to the $PATH shell variable. It is a list of\n\
directories, separated by colons. These directories are searched to find\n\
fully linked executable files and separately compiled object files as needed.");
+ c->completer = filename_completer;
c = add_cmd ("paths", no_class, path_info,
"Current search path for finding object files.\n\
@@ -1928,13 +1931,14 @@ the breakpoint won't break until the Nth time it is reached).");
add_com_alias ("c", "cont", class_run, 1);
add_com_alias ("fg", "cont", class_run, 1);
- add_com ("run", class_run, run_command,
+ c = add_com ("run", class_run, run_command,
"Start debugged program. You may specify arguments to give it.\n\
Args may include \"*\", or \"[...]\"; they are expanded using \"sh\".\n\
Input and output redirection with \">\", \"<\", or \">>\" are also allowed.\n\n\
With no arguments, uses arguments last specified (with \"run\" or \"set args\").\n\
To cancel previous arguments and run with no arguments,\n\
use \"set args\" without arguments.");
+ c->completer = filename_completer;
add_com_alias ("r", "run", class_run, 1);
if (xdb_commands)
add_com ("R", class_run, run_no_args_command,