binutils-gdb/gdb/testsuite/lib
Yao Qi bae62ee208 Skip gdb.server/ tests if lack of XML support
I recently see some gdb.server/*.exp fails in my native gdb testing,
in which libexpat isn't available, so GDB isn't able to parse xml file.
It causes gdb.server/ tests fails because GDB can't get registers
correctly from GDBserver.

(gdb) PASS: gdb.server/connect-without-multi-process.exp: multiprocess=off: break main
target remote localhost:2352^M
Remote debugging using localhost:2352^M
warning: Can not parse XML target description; XML support was disabled at compile time^M
Reading /lib/ld-linux-armhf.so.3 from remote target...^M
warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.^M
Reading /lib/ld-linux-armhf.so.3 from remote target...^M
Reading symbols from target:/lib/ld-linux-armhf.so.3...Reading /lib/ld-2.17.so.debug from remote target...^M
Reading /lib/.debug/ld-2.17.so.debug from remote target...^M
(no debugging symbols found)...done.^M
Remote 'g' packet reply is too long: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000efffbe00000000808d0f4d100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000^
0x4d0f8d80 in _start () from target:/lib/ld-linux-armhf.so.3^M

Without XML support in GDB, it can't parse xml sent by GDBserver, and has
to fall back to the oldest arch.  However, GDBserver doesn't know this
(IMO, this is a defect in RSP), and still choose the right target
description to create regcache and 'g' packet.  If the port only has
one target description or coincidentally two sides choose the same
target description, there is no such issue.  Otherwise, GDB is broken
on read registers.

This patch is to skip gdbserver tests if XML is not support and the
target has multiple target descriptions.

gdb/testsuite:

2016-07-21  Yao Qi  <yao.qi@linaro.org>

	* lib/gdbserver-support.exp (skip_gdbserver_tests): Return 1
	if gdb_skip_xml_test is true on some targets.
2016-07-21 09:24:44 +01:00
..
ada.exp Remove extra output directory level for Ada tests 2016-07-06 10:03:15 -04:00
append_gdb_boards_dir.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
build-piece.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
cache.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
cell.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
cl_util.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
cl_util.h GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
compiler.c testsuite: Support detection of Intel compilers via test_compiler_version. 2016-04-18 13:52:43 +02:00
compiler.cc testsuite: Support detection of Intel compilers via test_compiler_version. 2016-04-18 13:52:43 +02:00
cp-support.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
d-support.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
dtrace.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
dwarf.exp PR symtab/19999 gdb unable to resolve vars with fission+PIE 2016-05-12 09:24:24 -07:00
fortran.exp fortran: Testsuite, fix different type naming across compilers. 2016-04-18 14:04:07 +02:00
future.exp Update gdb test suite for Rust 2016-05-17 12:02:01 -06:00
gdb-guile.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
gdb-python.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
gdb-utils.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
gdb.exp Extend JIT-reader test and fix GDB problems that exposes 2016-07-01 11:56:39 +01:00
gdbserver-support.exp Skip gdb.server/ tests if lack of XML support 2016-07-21 09:24:44 +01:00
gen-perf-test.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
go.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
java.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
mi-support.exp Make testing gdb with FORCE_SEPARATE_MI_TTY=1 actually work 2016-06-30 11:55:21 +01:00
objc.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
opencl.exp testsuite: Fix some tests that write outside of the standard output directory 2016-02-15 11:46:10 -05:00
opencl_hostapp.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
opencl_kernel.cl
pascal.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
pdtrace.in GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
perftest.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
prelink-support.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
prompt.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
range-stepping-support.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
read1.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
rust-support.exp Update gdb test suite for Rust 2016-05-17 12:02:01 -06:00
selftest-support.exp Match the selftest output when captured_main is inlined 2016-07-12 15:39:34 +01:00
set_unbuffered_mode.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
trace-support.exp gdbserver/s390: Switch on tracepoint support. 2016-03-29 23:08:05 +02:00
unbuffer_output.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00