Fix and improve comment in gdb_remote_download
authorSimon Marchi <simon.marchi@ericsson.com>
Wed, 13 Apr 2016 14:47:29 +0000 (10:47 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Wed, 13 Apr 2016 14:47:29 +0000 (10:47 -0400)
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.

gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdb.exp

index ef3e66d0f35811ee2a232b9a499fb5332d086fed..47e8ae39bc2e70f3f345827b30ac51d05bed04a0 100644 (file)
@@ -1,3 +1,7 @@
+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
index 1ef6a9693ed6552c0459f096dc312ab98d4a6421..0d8a3b060fa5fb62aa83c592f0da1c05eb392c2d 100644 (file)
@@ -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
This page took 0.033871 seconds and 4 git commands to generate.