8sa1-binutils-gdb/gdb/testsuite/lib
Tom de Vries 3f94e58859 [gdb/testsuite] Add have_mpx in lib/gdb.exp
The sources for the test-cases gdb.arch/i386-mpx*.exp contain have_mpx
functions that test whether the processor supports mpx instructions.

OTOH, the test-cases are compiled using -mmpx -fcheck-pointer-bounds, which
instrument all functions with mpx instructions.

So, the function that is supposed to test whether mpx instruction are
supported contains mpx instructions, which is a bit odd.

We could fix this by:
- factoring out the have_mpx function into a single source file, and
- compiling it without "-mmpx -fcheck-pointer-bounds".

But having the mpx support test as part of the test-cases seems like an
unnecessary complication that makes the test-cases more difficult to analyze,
reason about and modify.

So we go one step further and factor out the mpx support test in into a
gdb_caching_proc.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2021-01-12  Tom de Vries  <tdevries@suse.de>

	* gdb.arch/i386-mpx-call.c (have_mpx): Remove.
	(main): Remove call to have_mpx.
	* gdb.arch/i386-mpx-call.exp: Use have_mpx.
	* gdb.arch/i386-mpx-map.c (have_mpx): Remove.
	(main): Remote call to have_mpx.
	* gdb.arch/i386-mpx-map.exp: Use have_mpx.
	* gdb.arch/i386-mpx-sigsegv.c (have_mpx): Remove.
	(main): Remove call to have_mpx.
	* gdb.arch/i386-mpx-sigsegv.exp: Use have_mpx.
	* gdb.arch/i386-mpx-simple_segv.c (have_mpx): Remove.
	(main): Remove call to have_mpx.
	* gdb.arch/i386-mpx-simple_segv.exp: Use have_mpx.
	* gdb.arch/i386-mpx.c (have_mpx): Remove.
	(main): Remote call to have_mpx.
	* gdb.arch/i386-mpx.exp: Use have_mpx.
	* lib/gdb.exp (have_mpx): New proc.
2021-01-12 17:36:51 +01:00
..
ada.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
append_gdb_boards_dir.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
attributes.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
build-piece.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
cache.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
check-test-names.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
cl_util.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
cl_util.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
compile-support.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
compiler.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
compiler.cc Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
completion-support.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
cp-support.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
d-support.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
data-structures.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
dtrace.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
dwarf.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
fortran.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
future.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
gdb-guile.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
gdb-python.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
gdb-utils.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
gdb.exp [gdb/testsuite] Add have_mpx in lib/gdb.exp 2021-01-12 17:36:51 +01:00
gdbserver-support.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
gen-perf-test.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
gnat_debug_info_test.adb
go.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
jit-elf-helpers.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
memory.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mi-support.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
my-syscalls.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
my-syscalls.S Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
objc.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
opencl_hostapp.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
opencl_kernel.cl
opencl.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
pascal.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
pdtrace.in Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
perftest.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
prelink-support.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
prompt.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
range-stepping-support.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
read1.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
rust-support.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
selftest-support.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
set_unbuffered_mode.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
sym-info-cmds.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
trace-support.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
tuiterm.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
unbuffer_output.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
valgrind.exp Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00