binutils-gdb/gdb/testsuite/gdb.server
Maciej W. Rozycki 0726fcc61a testsuite: Fix a `server_pid' access crash in gdb.server/server-kill.exp
Fix a commit f90183d7e3 ("Get GDBserver pid on remote target") bug and
correctly handle the case where the PID of `gdbserver' could not have
been retrieved.  If that happens, $server_pid is unset causing:

FAIL: gdb.server/server-kill.exp: p server_pid
ERROR: tcl error sourcing .../gdb/testsuite/gdb.server/server-kill.exp.
ERROR: can't read "server_pid": no such variable
    while executing
"if {$server_pid == "" } {
    return -1
}"
    (file ".../gdb/testsuite/gdb.server/server-kill.exp" line 49)
    invoked from within
"source .../gdb/testsuite/gdb.server/server-kill.exp"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 source .../gdb/testsuite/gdb.server/server-kill.exp"
    invoked from within
"catch "uplevel #0 source $test_file_name""

Verify that the variable exists then rather than trying to access it.

	gdb/testsuite/
	* gdb.server/server-kill.exp: Verify whether `server_pid' exists
	rather then trying to access it in determining whether the PID
	of `gdbserver' could have been retrieved.
2018-05-15 15:54:36 +01:00
..
abspath.exp Make gdbserver work with filename-only binaries 2018-02-28 11:37:10 -05:00
connect-stopped-target.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
connect-stopped-target.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
connect-with-no-symbol-file.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
connect-with-no-symbol-file.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
connect-without-multi-process.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
connect-without-multi-process.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
ext-attach.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
ext-attach.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
ext-restart.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
ext-run.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
ext-wrapper.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
file-transfer.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
no-thread-db.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
no-thread-db.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
non-existing-program.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
normal.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
reconnect-ctrl-c.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
reconnect-ctrl-c.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
run-without-local-binary.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
server-exec-info.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
server-kill.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
server-kill.exp testsuite: Fix a `server_pid' access crash in gdb.server/server-kill.exp 2018-05-15 15:54:36 +01:00
server-mon.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
server-run.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
server.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
solib-list-lib.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
solib-list-main.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
solib-list.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
stop-reply-no-thread.c Fix backwards compatibility with old GDBservers (PR remote/22597) 2018-01-11 00:23:04 +00:00
stop-reply-no-thread.exp Fix backwards compatibility with old GDBservers (PR remote/22597) 2018-01-11 00:23:04 +00:00
transfer.txt
unittest.exp Fix GDBserver build failure when $development is false 2018-01-08 10:09:33 +00:00
wrapper.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
wrapper.exp Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00