aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-26 22:04:40 -0700
committerTom Tromey <tromey@redhat.com>2014-01-20 09:10:51 -0700
commit1f2bdf09c6ace2eefc3dd4dfc7366dea9ff5b30e (patch)
tree45c24f000adc6a7696aa44163b94d1359f70b6f4 /gdb/top.c
parentcec2c50d38391e11f7116643450156560e5a1b91 (diff)
downloadgdb-1f2bdf09c6ace2eefc3dd4dfc7366dea9ff5b30e.zip
gdb-1f2bdf09c6ace2eefc3dd4dfc7366dea9ff5b30e.tar.gz
gdb-1f2bdf09c6ace2eefc3dd4dfc7366dea9ff5b30e.tar.bz2
convert flags to bitfields
This changes various flags struct cmd_list_element into bitfields. In general I think bitfields are cleaner than flag words, at least in a case like this where there is no need to pass the flags around independently of the enclosing struct. 2014-01-20 Tom Tromey <tromey@redhat.com> * cli/cli-decode.c (add_cmd, deprecate_cmd, add_alias_cmd) (add_setshow_cmd_full, delete_cmd, lookup_cmd_1) (deprecated_cmd_warning, complete_on_cmdlist): Update. * cli/cli-decode.h (CMD_DEPRECATED, DEPRECATED_WARN_USER) (MALLOCED_REPLACEMENT, DOC_ALLOCATED): Remove. (struct cmd_list_element) <flags>: Remove. <cmd_deprecated, deprecated_warn_user, malloced_replacement, doc_allocated>: New fields. <hook_in, allow_unknown, abbrev_flag, type, var_type>: Now bitfields. * maint.c (maintenance_do_deprecate): Update. * top.c (execute_command): Update.
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/top.c b/gdb/top.c
index f92043d..78976d4 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -440,7 +440,7 @@ execute_command (char *p, int from_tty)
/* If this command has been pre-hooked, run the hook first. */
execute_cmd_pre_hook (c);
- if (c->flags & DEPRECATED_WARN_USER)
+ if (c->deprecated_warn_user)
deprecated_cmd_warning (line);
/* c->user_commands would be NULL in the case of a python command. */