[RFA] add $GDBSERVER to find_gdbserver

Doug Evans
2008-05-06T00:12:48Z

If one wants to run the testsuite with the installed version of gdb one can do:

runtest --tool gdb GDB=/mumble

The testsuite harness assumes that if gdb is /mumble/gdb then gdbserver
is /mumble/gdbserver. This isn't always the case.

This patch allows one to do

runtest --tool gdb GDB=/mumble GDBSERVER=/mumble2

Ok to check in?

2008-05-05 Doug Evans <dje@google.com>

* lib/gdbserver-support.exp (find_gdbserver): Use $GDBSERVER if set.

Index: lib/gdbserver-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdbserver-support.exp,v
retrieving revision 1.12
diff -u -p -u -p -r1.12 gdbserver-support.exp
--- lib/gdbserver-support.exp 30 Jan 2008 00:51:50 -0000 1.12
+++ lib/gdbserver-support.exp 6 May 2008 00:06:15 -0000
@@ -105,6 +105,11 @@ set portnum "2345"

proc find_gdbserver { } {
global GDB
+ global GDBSERVER
+
+ if [info exists GDBSERVER] {
+ return ${GDBSERVER}
+ }

if [target_info exists gdb_server_prog] {
return [target_info gdb_server_prog]