diff options
author | Yao Qi <yao@codesourcery.com> | 2012-08-09 12:53:46 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2012-08-09 12:53:46 +0000 |
commit | 5b9afe8a3531f45255ee97465b52d2769a9a8ab5 (patch) | |
tree | 7d475e24cb1da1640836ae4b9ed9840f07291ef8 /gdb/cli/cli-decode.h | |
parent | d21911eaddba472db273e212ae6047186974f394 (diff) | |
download | gdb-5b9afe8a3531f45255ee97465b52d2769a9a8ab5.zip gdb-5b9afe8a3531f45255ee97465b52d2769a9a8ab5.tar.gz gdb-5b9afe8a3531f45255ee97465b52d2769a9a8ab5.tar.bz2 |
gdb/
* cli/cli-decode.c (set_cmd_prefix): New.
(lookup_cmd_for_prefixlist): New.
(add_prefix_cmd): Call set_cmd_prefix and update field 'prefix'
of each cmd_list_element in *prefixlist.
(add_setshow_cmd_full): set_cmd_prefix.
(add_alias_cmd): Likewise.
* cli/cli-decode.h (struct cmd_list_element) <prefix>: New field.
Declare 'auto_boolean_enums'.
* cli/cli-setshow.c: Include "observer.h".
(notify_command_param_changed_p): New.
(add_setshow_auto_boolean_cmd): Move auto_boolean_enums out.
Remove 'static'.
(do_setshow_command): Split it to ...
(do_set_command, do_show_command): ... them. New.
(do_set_command): Call observer_notify_command_param_changed if
notify_command_param_changed_p returns true.
(cmd_show_list): Caller update.
* auto-load.c (set_auto_load_cmd): Likewise.
* remote.c (show_remote_cmd): Likewise.
* cli/cli-setshow.h: Update declarations.
* top.c (execute_command): Call do_set_command and do_show_command.
* NEWS: Mention new MI notification.
* mi/mi-interp.c: Declare mi_command_param_changed.
(mi_interpreter_init): Attach mi_command_param_changed to
observer command_param_changed.
(mi_command_param_changed): New.
Remove mi_suppress_breakpoint_notifications.
Define global variable mi_suppress_notification.
(mi_breakpoint_created): Update.
(mi_breakpoint_deleted): Likewise.
(mi_breakpoint_modified): Likewise.
* mi/mi-main.c (mi_cmd_execute): Likewise. Check command
'gdb-set' and set mi_suppress_notification.
* mi/mi-main.h: (mi_suppress_notification): New struct.
gdb/doc/
* observer.texi: New observer command_param_changed.
* gdb.texinfo (GDB/MI Async Records): Doc for '=cmd-param-changed'.
gdb/testsuite/
* gdb.mi/mi-cmd-param-changed.exp: New.
* gdb.mi/mi-cli.exp: Update for MI notification "=cmd-param-changed".
* gdb.mi/mi-var-rtti.exp, gdb.mi/mi2-cli.exp: Likewise.
* gdb.mi/mi2-prompt.exp: Likewise.
Diffstat (limited to 'gdb/cli/cli-decode.h')
-rw-r--r-- | gdb/cli/cli-decode.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h index b5e0790..edae6e8 100644 --- a/gdb/cli/cli-decode.h +++ b/gdb/cli/cli-decode.h @@ -149,6 +149,9 @@ struct cmd_list_element recognized; call the prefix's own function in that case. */ char allow_unknown; + /* The prefix command of this command. */ + struct cmd_list_element *prefix; + /* Nonzero says this is an abbreviation, and should not be mentioned in lists of commands. This allows "br<tab>" to complete to "break", which it @@ -232,5 +235,6 @@ extern void not_just_help_class_command (char *arg, int from_tty); extern void print_doc_line (struct ui_file *, char *); +extern const char * const auto_boolean_enums[]; #endif /* !defined (CLI_DECODE_H) */ |