aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/jit.exp
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2016-04-05 13:59:49 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2016-04-05 13:59:49 -0400
commit7817ea46148df2931cf00d17aeedb844b6e4e4db (patch)
tree8747f7206f2b3fb8120ee7e8d0cbfa0eb7124e72 /gdb/testsuite/gdb.base/jit.exp
parent4dca19f828e7b3194ea146c8e1172678f0e42f3d (diff)
downloadgdb-7817ea46148df2931cf00d17aeedb844b6e4e4db.zip
gdb-7817ea46148df2931cf00d17aeedb844b6e4e4db.tar.gz
gdb-7817ea46148df2931cf00d17aeedb844b6e4e4db.tar.bz2
Improve gdb_remote_download, remove gdb_download
This patch removes gdb_download in favor of gdb_remote_download, since they are very close in functionality. Also, in preparation for the following patch about shared library handling during tests, it improves gdb_remote_download so that it uses standard_output_file for any destination board that is local, not only host. If the destination board is remote, gdb_remote_download will use the standard remote_download from DejaGnu, resulting in the file being transferred on the remote system. If the destination is local, gdb_remote_download will copy the file to the standard test directory (found using standard_output_file). Tcl's file copy seems to handle gracefully cases where the source file is the same as the destination, so I don't think it's necessary to check for that case ourselves, as a previous version of the patch did. I'd prefer to keep the name gdb_download instead of gdb_remote_download, since I don't like the fact that gdb_remote_download implies that the destination is remote, when it's not always the case. However, gdb_remote_download is used at many more places than gdb_download, so it's easier to reuse that. Also, since it's a wrapper around DejaGnu's remote_download, it might be better to keep that name. I don't know. I ran the testsuite native, with native-gdbserver and with a remote gdbserver, and didn't see any related failure. gdb/testsuite/ChangeLog: * gdb.base/jit-so.exp: Use gdb_remote_download instead of gdb_download. Use it even if the target is not remote. * gdb.base/jit.exp (compile_jit_test): Likewise. * lib/gdb.exp (gdb_remote_download): Copy files to the standard output directory if the destination board is local, otherwise use the standard remote_download from DejaGnu. (gdb_download): Remove. (gdb_load_shlibs): Use gdb_remote_download instead of gdb_download. * lib/gdbserver-support.exp (gdbserver_download_current_prog): Use gdb_remote_download instead of gdb_download. Use it even if the target is not remote. * lib/mi-support.exp (mi_load_shlibs): Use gdb_remote_download instead of gdb_download.
Diffstat (limited to 'gdb/testsuite/gdb.base/jit.exp')
-rw-r--r--gdb/testsuite/gdb.base/jit.exp6
1 files changed, 1 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.base/jit.exp b/gdb/testsuite/gdb.base/jit.exp
index da9449b..17024e4 100644
--- a/gdb/testsuite/gdb.base/jit.exp
+++ b/gdb/testsuite/gdb.base/jit.exp
@@ -57,11 +57,7 @@ proc compile_jit_test {testname binsuffix options} {
return -1
}
- if {[is_remote target]} {
- set solib_binfile_target [gdb_download ${solib_binfile}]
- } else {
- set solib_binfile_target $solib_binfile
- }
+ set solib_binfile_target [gdb_remote_download target ${solib_binfile}]
return 0
}