For *reasons* I was hacking on gdb.base/foll-vfork.exp and wanted to
change the name of the binary that was created. Should be easy, I
adjusted the global $binfile variable .... but that didn't work.
In one place the script uses $testfile instead of $binfile.
Fixed this to use $binfile, now I can easily change the name of the
generated binary, and the test still works.
There's no change in what is tested after this commit.
# Because setup_gdb uses 'return -code return' which would return to
# our caller we need to wrap this call, spot when setup_gdb failed
# (with return code 2), and then issue our own 'return -code return'.
- set code [catch {setup_gdb $::testfile $::srcfile} string]
+ set code [catch {setup_gdb $::binfile $::srcfile} string]
if { $code == 2 } {
unsupported "vfork catchpoints"
return -code return