* NEWS: Document "define" for prefixed commands.

* cli/cli-cmds.c (show_user): Update calls to show_user_1.  Call
	show_user_1 for prefix commands.
	* cli/cli-decode.c (help_cmd_list): Recurse for "help user-defined".
	* cli/cli-script.c (validate_comname): Rewrite to handle prefix
	commands.  Return the containing command list.
	(define_command, document_command): Update to handle prefix commands.
	(show_user_1): Add prefix and name arguments.  Handle prefix
	commands.
	* cli/cli-script.h (show_user_1): Update prototype.

	doc/
	* gdb.texinfo (Define, Hooks): Document prefix command support.

	testsuite/
	* gdb.base/define.exp: Test defining and hooking prefix commands.
	* gdb.python/python.exp: Update test for "show user" output.
This commit is contained in:
Daniel Jacobowitz
2009-01-14 20:40:09 +00:00
parent a32d7317c7
commit adb483feb8
11 changed files with 152 additions and 39 deletions

View File

@@ -33,7 +33,8 @@ extern void while_command (char *arg, int from_tty);
extern void if_command (char *arg, int from_tty);
extern void show_user_1 (struct cmd_list_element *c, struct ui_file *stream);
extern void show_user_1 (struct cmd_list_element *c, char *prefix,
char *name, struct ui_file *stream);
/* Exported to gdb/breakpoint.c */