This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] testsuite: let find_gdbserver call which before return ""
- From: Hui Zhu <hui_zhu at mentor dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Thu, 29 Mar 2012 13:09:11 +0800
- Subject: [PATCH] testsuite: let find_gdbserver call which before return ""
Hi,
I got some trouble with testsuite about gdbserver for example:
make check RUNTESTFLAGS="server-run.exp"
It will not works because testsuite cannot get gdbserver from
find_gdbserver.
In the find_gdbserver, we can find that if didn't find gdbserver from
GDBSERVER or gdb_server_prog, it will:
set gdbserver "${GDB}server"
if { [file isdirectory $gdbserver] } {
append gdbserver "/gdbserver"
}
if { [file executable $gdbserver] } {
return $gdbserver
}
But file executable just check the gdbserver in current work directory.
So it will return "".
The attachment is a patch that add some code that call "which
$gdbserver" after this part. If the reply include $gdbserver and it is
executable, return it. Then make check RUNTESTFLAGS="server-run.exp"
can work OK now.
Thanks,
Hui
2012-03-29 Hui Zhu <hui_zhu@mentor.com>
* lib/gdbserver-support.exp (find_gdbserver): Add code for
which gdbserver.
Attachment:
testsuite-find_gdbserver.txt
Description: Text document