aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2016-04-13 10:47:29 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2016-04-13 10:47:29 -0400
commit8392fa22d69113602407281cbb364f29557c39b1 (patch)
tree62fc904d02357d9f8f21c7ebbf7150ccc5759834 /gdb/testsuite
parentfd85a6a1f6aa4abe1c908b909fdb659ac574e5c7 (diff)
downloadgdb-8392fa22d69113602407281cbb364f29557c39b1.zip
gdb-8392fa22d69113602407281cbb364f29557c39b1.tar.gz
gdb-8392fa22d69113602407281cbb364f29557c39b1.tar.bz2
Fix and improve comment in gdb_remote_download
This patch fixes the current comment in gdb_remote_download, which is false (the "except if that's already where it is" part). It also improves it, by explaining why pass TOFILE through standard_output_file, even it is an absolute path. gdb/testsuite/ChangeLog: * lib/gdb.exp (gdb_remote_download): Fix and extend comment.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/lib/gdb.exp9
2 files changed, 11 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index ef3e66d..47e8ae3 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2016-04-13 Simon Marchi <simon.marchi@ericsson.com>
+ * lib/gdb.exp (gdb_remote_download): Fix and extend comment.
+
+2016-04-13 Simon Marchi <simon.marchi@ericsson.com>
+
* boards/gdbserver-base.exp (${board}_download): Copy source file to
standard output directory.
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 1ef6a96..0d8a3b0 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4211,8 +4211,13 @@ proc gdb_remote_download {dest fromfile {tofile {}}} {
return $destname
} else {
- # When the DEST is local, we copy the file to the test directory
- # (where the executable is), except if that's already where it is.
+ # When the DEST is local, we copy the file to the test directory (where
+ # the executable is).
+ #
+ # Note that we pass TOFILE through standard_output_file, regardless of
+ # whether it is absolute or relative, because we don't want the tests
+ # to be able to write outside their standard output directory.
+
set tofile [standard_output_file $tofile]
file copy -force $fromfile $tofile