[gdb/testsuite] Fix copy-to-remote in gdb.base/vfork-follow-parent.exp
authorTom de Vries <tdevries@suse.de>
Thu, 17 Aug 2023 08:21:18 +0000 (10:21 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 17 Aug 2023 08:21:18 +0000 (10:21 +0200)
commitf0ae7030f00ea08c9ec09493b6ece447879bcab4
treeefcd7037ec4f9179b315dcd854695c3919d2b9a3
parent3afe50fe1974f9a13326a31696f5a93371ed00b7
[gdb/testsuite] Fix copy-to-remote in gdb.base/vfork-follow-parent.exp

When running test-case gdb.base/vfork-follow-parent.exp, I run into:
...
ERROR: tcl error sourcing gdb/testsuite/gdb.base/vfork-follow-parent.exp.
ERROR: error copying "vforked-prog": no such file or directory
    while executing
"file copy -force $fromfile $tofile"
    (procedure "gdb_remote_download" line 29)
    invoked from within
"gdb_remote_download target $binfile3"
...

Fix this by:
- making the copy-to-remote conditional on is_remote target, and
- allowing gdb_remote_download to find $binfile3 by using
  standard_output_file.

Also remove unused variable remote_exec_prog.

Tested on x86_64-linux.
gdb/testsuite/gdb.base/vfork-follow-parent.exp