binutils-gdb/gdb/testsuite/lib
Alan Hayward fc65c7dbe0 Testsuite: Ensure stack protection is off for GCC
Using -fstack-protector-strong will cause GDB to break on the wrong line
when placing a breakpoint on a function.  This is due to inadequate dwarf
line numbering, and is being tracked by the GCC bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88432

GCC (and Clang) provided by Debian/Ubuntu default to stack protector
being enabled.

Ensure that when running the GDB testsuite, stack protector is always
turned off for GCC 4.1.0 (when stack protector was added) and above.

Ensure that this does not cause infinite recursion due to
test_compiler_info having to compile a file itself.

Add a test to explicitly test breakpoints with various levels of stack
protection on both GCC and Clang, with xfail for the known errors.

Restore change in ovldbreak.exp which worked around the issue.

gdb/testsuite/ChangeLog:

2019-01-18  Alan Hayward  <alan.hayward@arm.com>

	* gdb.base/stack-protector.c: New test.
	* gdb.base/stack-protector.exp: New file.
	* gdb.cp/ovldbreak.exp: Only allow a single break line.
	* lib/gdb.exp (get_compiler_info): Use getting_compiler_info
	option.
	(gdb_compile): Remove stack protector for GCC and prevent
	recursion.
2019-01-21 10:43:53 +00:00
..
ada.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
append_gdb_boards_dir.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
build-piece.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
cache.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
cell.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
cl_util.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
cl_util.h Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
compile-support.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
compiler.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
compiler.cc Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
completion-support.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
cp-support.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
d-support.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
data-structures.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
dtrace.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
dwarf.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
fortran.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
future.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
gdb-guile.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
gdb-python.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
gdb-utils.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
gdb.exp Testsuite: Ensure stack protection is off for GCC 2019-01-21 10:43:53 +00:00
gdbserver-support.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
gen-perf-test.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
go.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
memory.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
mi-support.exp gdb/testsuite: Remove interactive prompt case from mi_gdb_test 2019-01-09 10:34:24 +00:00
objc.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
opencl.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
opencl_hostapp.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
opencl_kernel.cl
pascal.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
pdtrace.in Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
perftest.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
prelink-support.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
prompt.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
range-stepping-support.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
read1.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
rust-support.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
selftest-support.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
set_unbuffered_mode.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
trace-support.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
unbuffer_output.c Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00
valgrind.exp Update copyright year range in all GDB files. 2019-01-01 10:01:51 +04:00