binutils-gdb/gdb/cli
Tom Tromey 85c4be7c83 Add set_repeat_arguments function
The "x", "list", and "show commands" commands have special repetition
behavior: repeating the command doesn't re-run it with the same
arguments

This is currently implemented by modifying the passed-in argument; but
that won't work properly with const arguments (and seems pretty
obscure besides).

This patch adds a new "set_repeat_arguments" function and changes the
relevant places to call it.

gdb/ChangeLog
2017-11-07  Tom Tromey  <tom@tromey.com>

	* printcmd.c (x_command): Call set_repeat_arguments.
	* cli/cli-cmds.c (list_command): Call set_repeat_arguments.
	* top.c (repeat_arguments): New global.
	(set_repeat_arguments): New function.
	(execute_command): Handle repeat_arguments.
	(show_commands): Calls set_repeat_arguments.
	* command.h (set_repeat_arguments): Declare.
2017-11-07 13:59:09 -07:00
..
cli-cmds.c Add set_repeat_arguments function 2017-11-07 13:59:09 -07:00
cli-cmds.h
cli-decode.c Make set_cmd_cfunc private 2017-11-07 13:59:08 -07:00
cli-decode.h
cli-dump.c Constify add_prefix_cmd 2017-10-11 16:21:02 -06:00
cli-interp.c
cli-interp.h
cli-logging.c Constify add_prefix_cmd 2017-10-11 16:21:02 -06:00
cli-script.c Use console uiout when executing breakpoint commands 2017-10-31 21:34:24 -04:00
cli-script.h
cli-setshow.c
cli-setshow.h
cli-utils.c Make breakpoint/location number parsing error output consistent 2017-11-07 11:07:19 +00:00
cli-utils.h