binutils-gdb/gdb/cli
Tom Tromey b7b633e9b1 Use RAII to save and restore scalars
This patch replaces many (but not all) uses of
make_cleanup_restore_integer with a simple RAII-based template class.
It also removes the similar restore_execution_direction cleanup in
favor of this new class.  Subsequent patches will replace other
similar cleanups with this class.

The class is typically instantiated using make_scoped_restore.  This
allows for template argument deduction.

2016-10-21  Tom Tromey  <tom@tromey.com>

	* common/scoped_restore.h: New file.
	* utils.h: Include scoped_restore.h.
	* top.c (execute_command_to_string): Use scoped_restore.
	* python/python.c (python_interactive_command): Use
	scoped_restore.
	(python_command, execute_gdb_command): Likewise.
	* printcmd.c (do_one_display): Use scoped_restore.
	* mi/mi-main.c (exec_continue): Use scoped_restore.
	* mi/mi-cmd-var.c (mi_cmd_var_assign): Use scoped_restore.
	* linux-fork.c (checkpoint_command): Use scoped_restore.
	* infrun.c (restore_execution_direction): Remove.
	(fetch_inferior_event): Use scoped_restore.
	* compile/compile.c (compile_file_command): Use
	scoped_restore.
	(compile_code_command, compile_print_command): Likewise.
	* cli/cli-script.c (execute_user_command): Use
	scoped_restore.
	(while_command, if_command, script_from_file): Likewise.
	* arm-tdep.c (arm_insert_single_step_breakpoint): Use
	scoped_restore.
2016-10-21 14:17:31 -06:00
..
cli-cmds.c Use std::string rather than dyn-string 2016-09-23 11:37:09 -06:00
cli-cmds.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
cli-decode.c Emit inferior, thread and frame selection events to all UIs 2016-10-03 16:54:58 -04:00
cli-decode.h Emit inferior, thread and frame selection events to all UIs 2016-10-03 16:54:58 -04:00
cli-dump.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
cli-interp.c Emit inferior, thread and frame selection events to all UIs 2016-10-03 16:54:58 -04:00
cli-interp.h New function should_print_stop_to_console 2016-06-21 01:11:52 +01:00
cli-logging.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
cli-script.c Use RAII to save and restore scalars 2016-10-21 14:17:31 -06:00
cli-script.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
cli-setshow.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
cli-setshow.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
cli-utils.c Convert tid_range_parser and get_number_or_range to classes 2016-10-13 01:54:07 +01:00
cli-utils.h Convert tid_range_parser and get_number_or_range to classes 2016-10-13 01:54:07 +01:00