binutils-gdb/gdb/common
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
..
agent.c
agent.h
ax.def
break-common.h
btrace-common.c Add method/format information to =record-started 2016-06-06 17:10:18 -04:00
btrace-common.h Add method/format information to =record-started 2016-06-06 17:10:18 -04:00
buffer.c
buffer.h
cleanups.c
cleanups.h
common-debug.c
common-debug.h
common-defs.h gdb: no longer define __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS 2016-10-18 20:48:37 +01:00
common-exceptions.c Propagate GDB/C++ exceptions across readline using sj/lj-based TRY/CATCH 2016-04-22 16:20:04 +01:00
common-exceptions.h gdb: Remove some C compiler support leftovers 2016-10-06 19:23:37 +01:00
common-regcache.c
common-regcache.h
common-types.h
common-utils.c Add xmalloc_failed() function to common-utils.c in to avoid the need to link in libiberty's xmalloc code. 2016-06-01 11:44:08 +01:00
common-utils.h
common.host
common.m4 Fix PR gdb/18653: gdb disturbs inferior's inherited signal dispositions 2016-08-09 20:16:20 +01:00
create-version.sh
enum-flags.h
errors.c
errors.h
fileio.c
fileio.h
filestuff.c
filestuff.h
format.c
format.h
gdb_assert.h
gdb_locale.h gdb: Fix build breakage with GCC 4.1 and --disable-nls 2016-09-19 16:55:35 +01:00
gdb_setjmp.h
gdb_signals.h
gdb_sys_time.h
gdb_unique_ptr.h Introduce gdb::unique_ptr 2016-10-18 11:42:35 +01:00
gdb_vecs.c
gdb_vecs.h
gdb_wait.h
host-defs.h
mingw-strerror.c
new-op.c gdb: Replace operator new / operator new[] 2016-09-23 16:42:24 +01:00
posix-strerror.c
print-utils.c
print-utils.h
ptid.c
ptid.h
queue.h
rsp-low.c
rsp-low.h
scoped_restore.h Use RAII to save and restore scalars 2016-10-21 14:17:31 -06:00
signals-state-save-restore.c Quiet ARI gettext checks 2016-08-10 16:06:57 +01:00
signals-state-save-restore.h Fix PR gdb/18653: gdb disturbs inferior's inherited signal dispositions 2016-08-09 20:16:20 +01:00
signals.c Pass SIGLIBRT directly to child processes. 2016-07-15 06:35:37 -07:00
symbol.h
vec.c
vec.h
version.h
x86-xstate.h Add target descriptions for AVX + MPX 2016-04-19 15:44:32 +02:00
xml-utils.c
xml-utils.h