binutils-gdb/gdb/testsuite/gdb.server
Pedro Alves 096be756aa Fix gdb.server/solib-list.exp regression
Commit 7817ea4614 (Improve gdb_remote_download, remove gdb_download)
caused:

 FAIL: gdb.server/solib-list.exp: non-stop 0: target extended-remote (timeout)
 FAIL: gdb.server/solib-list.exp: non-stop 0: continue (the program is no longer running)
 FAIL: gdb.server/solib-list.exp: non-stop 0: p libvar
 FAIL: gdb.server/solib-list.exp: non-stop 1: target extended-remote (timeout)
 FAIL: gdb.server/solib-list.exp: non-stop 1: continue (the program is no longer running)
 FAIL: gdb.server/solib-list.exp: non-stop 1: p libvar

gdb.log shows:

 system interpreter is: /lib64/ld-linux-x86-64.so.2
 ...
 spawn ../gdbserver/gdbserver --once :2347 /home/pedro/brno/pedro/gdb/mygit/build/gdb/testsuite/outputs/gdb.server/solib-list/ld-linux-x86-64.so.2 /home/pedro/brno/pedro/gdb/mygit/build/gdb/testsuite/outputs/gdb.server/solib-list/solib-list
 Process /home/pedro/brno/pedro/gdb/mygit/build/gdb/testsuite/outputs/gdb.server/solib-list/ld-linux-x86-64.so.2 created; pid = 18637
 Cannot exec /home/pedro/brno/pedro/gdb/mygit/build/gdb/testsuite/outputs/gdb.server/solib-list/ld-linux-x86-64.so.2: No such file or directory.
 ...

The test copied the interpreter to the outputs directory, however
ld-linux-x86-64.so.2 is a relative symlink that when copied points
nowhere:

 $ ls -l testsuite/outputs/gdb.server/solib-list/
 total 52
 -rwxrwxr-x. 1 pedro pedro 13450 Apr  7 10:52 gdb.log
 -rw-rw-r--. 1 pedro pedro  1512 Apr  7 10:52 gdb.sum
 lrwxrwxrwx. 1 pedro pedro    10 Apr  7 11:39 ld-linux-x86-64.so.2 -> ld-2.22.so
 -rwxrwxr-x. 1 pedro pedro  9464 Apr  7 11:39 solib-list
 -rw-rw-r--. 1 pedro pedro  3472 Apr  7 11:39 solib-list-lib.c.o
 -rw-rw-r--. 1 pedro pedro  2760 Apr  7 11:39 solib-list.o
 -rwxrwxr-x. 1 pedro pedro  9232 Apr  7 11:39 solib-list.so

The copying comes from gdbserver_spawn ->
gdbserver_download_current_prog -> gdb_remote_download.

There's actually no need to download the interpreter to the target -
it's part of the target system/environment.  So fix this by making the
test just not use gdb_load (and gdb_file_cmd as consequence) at all,
and instead pass the interpreter filename to gdbserver as an argument.

gdb/testsuite/ChangeLog:
2016-04-08  Pedro Alves  <palves@redhat.com>

	* gdb.server/solib-list.exp: Don't use gdb_load.  Instead pass the
	interpreter filename as argument to gdbserver_spawn.
	* lib/gdbserver-support.exp (gdbserver_download_current_prog):
	Return empty if $last_loaded_file does not exist.
2016-04-08 19:40:01 +01:00
..
connect-stopped-target.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
connect-stopped-target.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
connect-without-multi-process.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
connect-without-multi-process.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
ext-attach.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
ext-attach.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
ext-restart.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
ext-run.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
ext-wrapper.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
file-transfer.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
no-thread-db.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
no-thread-db.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
non-existing-program.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
server-exec-info.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
server-kill.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
server-kill.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
server-mon.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
server-run.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
server.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
solib-list-lib.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
solib-list-main.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
solib-list.exp Fix gdb.server/solib-list.exp regression 2016-04-08 19:40:01 +01:00
transfer.txt
wrapper.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
wrapper.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00