Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix and improve comment in gdb_remote_download
@ 2016-04-13 14:23 Simon Marchi
  2016-04-13 14:46 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2016-04-13 14:23 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

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/lib/gdb.exp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

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
-- 
2.8.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-13 14:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13 14:23 [PATCH] Fix and improve comment in gdb_remote_download Simon Marchi
2016-04-13 14:46 ` Pedro Alves
2016-04-13 14:48   ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox