This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Add set_repeat_arguments function


*** TEST RESULTS FOR COMMIT 85c4be7c83b80acf647e6ffcaed0f0cdbcb8c3eb ***

Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: 85c4be7c83b80acf647e6ffcaed0f0cdbcb8c3eb

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]