From df0f0dcced510b759818a5171c4bc2a744fb41c0 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Mon, 14 Jun 1993 20:50:12 +0000 Subject: [PATCH] * 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. --- gdb/ChangeLog | 6 ++++-- gdb/core.c | 11 ++++++----- gdb/main.c | 14 ++++++++------ 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4b6b14f4d4..e580ff41ba 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,8 +1,10 @@ Mon Jun 14 09:23:51 1993 Jim Kingdon (kingdon@cygnus.com) * main.c, gdbcmd.h: Add function filename_completer. - source.c: Use it for "directory" command. - (This will be more useful if the word break stuff is fixed). + * 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. + (But '/' is a word break, limiting usefulness; see comments). * source.c (mod_path): Warning not error if can't find directory. diff --git a/gdb/core.c b/gdb/core.c index 51ffb42021..691637182f 100644 --- a/gdb/core.c +++ b/gdb/core.c @@ -25,6 +25,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "inferior.h" #include "symtab.h" #include "command.h" +#include "gdbcmd.h" #include "bfd.h" #include "target.h" #include "gdbcore.h" @@ -286,10 +287,10 @@ read_memory_unsigned_integer (memaddr, len) void _initialize_core() { - - add_com ("core-file", class_files, core_file_command, - "Use FILE as core dump for examining memory and registers.\n\ + struct cmd_list_element *c; + c = add_cmd ("core-file", class_files, core_file_command, + "Use FILE as core dump for examining memory and registers.\n\ No arg means have no core file. This command has been superseded by the\n\ -`target core' and `detach' commands."); - +`target core' and `detach' commands.", &cmdlist); + c->completer = filename_completer; } diff --git a/gdb/main.c b/gdb/main.c index e1758a3e42..d842197935 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."); -- 2.34.1