aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-06-14 20:50:12 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-06-14 20:50:12 +0000
commitdf0f0dcced510b759818a5171c4bc2a744fb41c0 (patch)
treeea3ebdd4f6ff8ddaec29d5fdf62ba1f4d53d9823 /gdb/main.c
parent672f4045d67e10d8360f5958710e11baa0f80191 (diff)
downloadgdb-df0f0dcced510b759818a5171c4bc2a744fb41c0.zip
gdb-df0f0dcced510b759818a5171c4bc2a744fb41c0.tar.gz
gdb-df0f0dcced510b759818a5171c4bc2a744fb41c0.tar.bz2
* main.c, symfile.c, source.c, exec.c, core.c: Use it for
"directory", "source", "cd", "symbol-file" "add-symbol-file", "load", "file", "exec-file", "core-file" commands.
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/main.c b/gdb/main.c
index e1758a3..d842197 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -2478,10 +2478,11 @@ The commands below can be used to select other frames by number or address.",
add_com ("pwd", class_files, pwd_command,
"Print working directory. This is used for your program as well.");
- add_com ("cd", class_files, cd_command,
+ c = add_cmd ("cd", class_files, cd_command,
"Set working directory to DIR for debugger and program being debugged.\n\
The change does not take effect for the program being debugged\n\
-until the next time it is started.");
+until the next time it is started.", &cmdlist);
+ c->completer = filename_completer;
add_show_from_set
(add_set_cmd ("prompt", class_support, var_string, (char *)&prompt,
@@ -2509,17 +2510,18 @@ Use the \"document\" command to give documentation for the new command.\n\
Commands defined in this way do not take arguments.");
#ifdef __STDC__
- add_com ("source", class_support, source_command,
+ c = add_cmd ("source", class_support, source_command,
"Read commands from a file named FILE.\n\
Note that the file \"" GDBINIT_FILENAME "\" is read automatically in this way\n\
-when gdb is started.");
+when gdb is started.", &cmdlist);
#else
/* Punt file name, we can't help it easily. */
- add_com ("source", class_support, source_command,
+ c = add_cmd ("source", class_support, source_command,
"Read commands from a file named FILE.\n\
Note that the file \".gdbinit\" is read automatically in this way\n\
-when gdb is started.");
+when gdb is started.", &cmdlist);
#endif
+ c->completer = filename_completer;
add_com ("quit", class_support, quit_command, "Exit gdb.");
add_com ("help", class_support, help_command, "Print list of commands.");