From 5a56e9c5e9a817598264d329c0f7936982683cf3 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Sun, 9 Oct 2011 22:21:43 +0000 Subject: Add new "alias" command. * NEWS: Mention new command. * command.h (valid_user_defined_cmd_name_p): Declare. * defs.h (make_cleanup_dyn_string_delete): Declare. * utils.c: #include "dyn-string.h". (do_dyn_string_delete, make_cleanup_dyn_string_delete): New functions. * cli/cli-cmds.c: #include "dyn-string.h". (argv_to_dyn_string, valid_command_p, alias_command): New functions. (init_cli_cmds): Add new command. * cli/cli-decode.c (valid_user_defined_cmd_name_p): New function. doc/ * gdb.texinfo (Extending GDB): Document alias command. testsuite/ * gdb.base/alias.exp: Add tests for alias command. --- gdb/command.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/command.h') diff --git a/gdb/command.h b/gdb/command.h index 0e2547e..04cb751 100644 --- a/gdb/command.h +++ b/gdb/command.h @@ -106,6 +106,8 @@ struct cmd_list_element; /* Forward-declarations of the entry-points of cli/cli-decode.c. */ +extern int valid_user_defined_cmd_name_p (const char *name); + extern struct cmd_list_element *add_cmd (char *, enum command_class, void (*fun) (char *, int), char *, struct cmd_list_element **); -- cgit v1.1