* cli/cli-decode.h (CMD_ASYNC_OK): New define.

(set_cmd_async_ok, get_cmd_async_ok): Declare.
	* cli/cli-decode.c (set_cmd_async_ok): New function.
	(get_cmd_async_ok): New function.
	* cli/cli-cmds.c (init_cli_cmds): Mark "pwd", "help", "info", and
	"show" as async-ok.
	* top.c (execute_command): Use get_cmd_async_ok.
	* infcmd.c: Include cli/cli-decode.h.
	(_initialize_infcmd): Mark "interrupt" as async-ok.
	* Makefile.in (infcmd.o): Depend on cli_decode_h.
This commit is contained in:
Tom Tromey
2008-04-17 00:25:01 +00:00
parent f3c69fcab1
commit 700b53b17a
7 changed files with 52 additions and 16 deletions

View File

@ -1202,8 +1202,9 @@ The commands below can be used to select other frames by number or address."),
/* Define general commands. */
add_com ("pwd", class_files, pwd_command, _("\
c = add_com ("pwd", class_files, pwd_command, _("\
Print working directory. This is used for your program as well."));
set_cmd_async_ok (c);
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\
@ -1243,6 +1244,7 @@ when GDB is started."), gdbinit);
c = add_com ("help", class_support, help_command,
_("Print list of commands."));
set_cmd_completer (c, command_completer);
set_cmd_async_ok (c);
add_com_alias ("q", "quit", class_support, 1);
add_com_alias ("h", "help", class_support, 1);
@ -1268,17 +1270,19 @@ Without an argument, history expansion is enabled."),
show_history_expansion_p,
&sethistlist, &showhistlist);
add_prefix_cmd ("info", class_info, info_command, _("\
c = add_prefix_cmd ("info", class_info, info_command, _("\
Generic command for showing things about the program being debugged."),
&infolist, "info ", 0, &cmdlist);
&infolist, "info ", 0, &cmdlist);
set_cmd_async_ok (c);
add_com_alias ("i", "info", class_info, 1);
add_com ("complete", class_obscure, complete_command,
_("List the completions for the rest of the line as a command."));
add_prefix_cmd ("show", class_info, show_command,
_("Generic command for showing things about the debugger."),
&showlist, "show ", 0, &cmdlist);
c = add_prefix_cmd ("show", class_info, show_command, _("\
Generic command for showing things about the debugger."),
&showlist, "show ", 0, &cmdlist);
set_cmd_async_ok (c);
/* Another way to get at the same thing. */
add_info ("set", show_command, _("Show all GDB settings."));