* 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.
This commit is contained in:
Jim Kingdon 1993-06-14 20:50:12 +00:00
parent 672f4045d6
commit df0f0dcced
3 changed files with 18 additions and 13 deletions

View File

@ -1,8 +1,10 @@
Mon Jun 14 09:23:51 1993 Jim Kingdon (kingdon@cygnus.com) Mon Jun 14 09:23:51 1993 Jim Kingdon (kingdon@cygnus.com)
* main.c, gdbcmd.h: Add function filename_completer. * main.c, gdbcmd.h: Add function filename_completer.
source.c: Use it for "directory" command. * main.c, symfile.c, source.c, exec.c, core.c: Use it for
(This will be more useful if the word break stuff is fixed). "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. * source.c (mod_path): Warning not error if can't find directory.

View File

@ -25,6 +25,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "inferior.h" #include "inferior.h"
#include "symtab.h" #include "symtab.h"
#include "command.h" #include "command.h"
#include "gdbcmd.h"
#include "bfd.h" #include "bfd.h"
#include "target.h" #include "target.h"
#include "gdbcore.h" #include "gdbcore.h"
@ -286,10 +287,10 @@ read_memory_unsigned_integer (memaddr, len)
void void
_initialize_core() _initialize_core()
{ {
struct cmd_list_element *c;
add_com ("core-file", class_files, core_file_command, c = add_cmd ("core-file", class_files, core_file_command,
"Use FILE as core dump for examining memory and registers.\n\ "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\ 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;
} }

View File

@ -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, add_com ("pwd", class_files, pwd_command,
"Print working directory. This is used for your program as well."); "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\ "Set working directory to DIR for debugger and program being debugged.\n\
The change does not take effect for the 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_show_from_set
(add_set_cmd ("prompt", class_support, var_string, (char *)&prompt, (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."); Commands defined in this way do not take arguments.");
#ifdef __STDC__ #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\ "Read commands from a file named FILE.\n\
Note that the file \"" GDBINIT_FILENAME "\" is read automatically in this way\n\ Note that the file \"" GDBINIT_FILENAME "\" is read automatically in this way\n\
when gdb is started."); when gdb is started.", &cmdlist);
#else #else
/* Punt file name, we can't help it easily. */ /* 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\ "Read commands from a file named FILE.\n\
Note that the file \".gdbinit\" is read automatically in this way\n\ Note that the file \".gdbinit\" is read automatically in this way\n\
when gdb is started."); when gdb is started.", &cmdlist);
#endif #endif
c->completer = filename_completer;
add_com ("quit", class_support, quit_command, "Exit gdb."); add_com ("quit", class_support, quit_command, "Exit gdb.");
add_com ("help", class_support, help_command, "Print list of commands."); add_com ("help", class_support, help_command, "Print list of commands.");