From 700b53b17a52448cb49f04a4e27d5f0130537924 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 17 Apr 2008 00:25:01 +0000 Subject: * 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. --- gdb/cli/cli-decode.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gdb/cli/cli-decode.h') diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h index 59a8239..f133b3d 100644 --- a/gdb/cli/cli-decode.h +++ b/gdb/cli/cli-decode.h @@ -48,6 +48,9 @@ cmd_types; #define DEPRECATED_WARN_USER 0x2 #define MALLOCED_REPLACEMENT 0x4 +/* This flag is set if the command is allowed during async execution. */ +#define CMD_ASYNC_OK 0x8 + struct cmd_list_element { /* Points to next command in this list. */ @@ -243,6 +246,13 @@ extern int cmd_cfunc_eq (struct cmd_list_element *cmd, extern void set_cmd_context (struct cmd_list_element *cmd, void *context); extern void *get_cmd_context (struct cmd_list_element *cmd); +/* Mark command as async-ready; there is no way to disable this once + set. */ +extern void set_cmd_async_ok (struct cmd_list_element *); + +/* Return true if command is async-ok. */ +extern int get_cmd_async_ok (struct cmd_list_element *); + extern struct cmd_list_element *lookup_cmd (char **, struct cmd_list_element *, char *, int, int); -- cgit v1.1