diff --git a/gdb/testsuite/gdb.base/vfork-follow-parent.exp b/gdb/testsuite/gdb.base/vfork-follow-parent.exp index 70b54e729a5..a29706f58c5 100644 --- a/gdb/testsuite/gdb.base/vfork-follow-parent.exp +++ b/gdb/testsuite/gdb.base/vfork-follow-parent.exp @@ -30,7 +30,9 @@ if { [build_executable "compile $binfile3" $binfile3 $srcfile2] } { return -1 } -set remote_exec_prog [gdb_remote_download target $binfile3] +if { [is_remote target] } { + gdb_remote_download target [standard_output_file $binfile3] +} set opts [list debug additional_flags=-DTEST_EXIT] if { [build_executable "compile ${binfile}" ${binfile} ${srcfile} ${opts}] } {