[gdb/testsuite] Fix stray file in gdb.dwarf2/gdb-index-nodebug.exp
commit385ab37c5b79a930f12ee05adc7d9af9f92fe578
authorTom de Vries <tdevries@suse.de>
Wed, 1 May 2024 09:11:24 +0000 (1 11:11 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 1 May 2024 09:11:24 +0000 (1 11:11 +0200)
treec0d4cc5ecf4f9bd7f38b4e9ba79229ccdd71a83c
parent7320840f1998547b4428c58d1b39ca41febad83a
[gdb/testsuite] Fix stray file in gdb.dwarf2/gdb-index-nodebug.exp

After running test-case gdb.dwarf2/gdb-index-nodebug.exp I have:
...
$ ls build/gdb/testsuite
cache       config.status                gdb.log  lib       outputs   site.exp
config.log  gdb-index-nodebug.gdb-index  gdb.sum  Makefile  site.bak  temp
...

The file gdb-index-nodebug.gdb-index doesn't belong there.

It happens to be there because we do:
...
set index_file ${testfile}.gdb-index
set cmd "save gdb-index [file dirname ${index_file}]"
...
which results in:
...
(gdb) save gdb-index .
...

The intention was possibly to use $binfile instead of $testfile, but using
that wouldn't work for remote host.

Fix this by using host_standard_output_file.

Tested on x86_64-linux.
gdb/testsuite/gdb.dwarf2/gdb-index-nodebug.exp