binutils-gdb/gdb/testsuite/lib
Andrew Burgess 45f25d6c83 gdb: Restore selected frame in print_frame_local_vars
PR gdb/23203 reports 'bt full' causing the currently selected frame to
change, this issue is fixed in this commit.

Add a new class scoped_restore_selected_frame that saves and restores
the selected frame.  Make use of this in print_frame_local_vars to
restore the selected frame on exit.

gdb/ChangeLog:

	PR gdb/23203
	* frame.c
	(scoped_restore_selected_frame::scoped_restore_selected_frame):
	Define.
	(scoped_restore_selected_frame::~scoped_restore_selected_frame):
	Define.
	* frame.h (class scoped_restore_selected_frame): New class.
	* stack.c (print_frame_local_vars): Remove catching and rethrowing
	of any exception, use scoped_restore_selected_frame to restore the
	frame instead.

gdb/testsuite/ChangeLog:

	PR gdb/23203
	* gdb.base/bt-selected-frame.c: New file.
	* gdb.base/bt-selected-frame.exp: New file.
	* lib/gdb.exp (get_current_frame_number): New function.
2018-05-24 18:01:31 +01:00
..
ada.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
append_gdb_boards_dir.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
build-piece.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
cache.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
cell.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
cl_util.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
cl_util.h Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
compiler.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
compiler.cc Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
completion-support.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
cp-support.exp Fix double space expected in cp_test_ptype_class 2018-02-25 15:12:37 -05:00
d-support.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
data-structures.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
dtrace.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
dwarf.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
fortran.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
future.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb-guile.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb-python.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb-utils.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gdb.exp gdb: Restore selected frame in print_frame_local_vars 2018-05-24 18:01:31 +01:00
gdbserver-support.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
gen-perf-test.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
go.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
memory.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
mi-support.exp gdb/testsuite: Fix broken regexp in gdbstub case 2018-05-04 11:11:45 +01:00
objc.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
opencl.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
opencl_hostapp.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
opencl_kernel.cl
pascal.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
pdtrace.in Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
perftest.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
prelink-support.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
prompt.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
range-stepping-support.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
read1.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
rust-support.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
selftest-support.exp Testsuite: fully migrate to use_gdb_stub convenience func 2018-03-23 10:38:23 +01:00
set_unbuffered_mode.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
trace-support.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
unbuffer_output.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00