From b05dcbb7f97fb8e8b1449a6bde96761b3cb3e39b Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 10 Dec 2008 01:05:16 +0000 Subject: gdb PR gdb/1815: * cli/cli-decode.c (delete_cmd): Forward declare. (delete_cmd): Now static. Change return type. Remove command from alias chain. Rewrite. (add_cmd): Initialize new fields. Update cmd_pointer on all aliases. (add_alias_cmd): Put command on alias chain. * command.h (delete_cmd): Don't declare. * cli/cli-decode.h (delete_cmd): Don't declare. (struct cmd_list_element) : New fields. gdb/testsuite * gdb.base/commands.exp (redefine_backtrace_test): New proc. Call it. --- gdb/cli/cli-decode.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gdb/cli/cli-decode.h') diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h index 4e2dbc159f6..9d27f0f73f5 100644 --- a/gdb/cli/cli-decode.h +++ b/gdb/cli/cli-decode.h @@ -197,6 +197,12 @@ struct cmd_list_element /* Pointer to command that is aliased by this one, so the aliased command can be located in case it has been hooked. */ struct cmd_list_element *cmd_pointer; + + /* Start of a linked list of all aliases of this command. */ + struct cmd_list_element *aliases; + + /* Link pointer for aliases on an alias list. */ + struct cmd_list_element *alias_chain; }; /* API to the manipulation of command lists. */ @@ -290,8 +296,6 @@ extern char **complete_on_cmdlist (struct cmd_list_element *, char *, char *); extern char **complete_on_enum (const char *enumlist[], char *, char *); -extern void delete_cmd (char *, struct cmd_list_element **); - extern void help_cmd_list (struct cmd_list_element *, enum command_class, char *, int, struct ui_file *); -- cgit v1.2.1