aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib/gdb.exp
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2024-05-01 11:46:05 +0200
committerTom de Vries <tdevries@suse.de>2024-05-01 11:46:05 +0200
commit347775edd49c0d8f6fda3d13a39c8cac6196da30 (patch)
treec4e06d02be03d12200451dedc87b3c96651fd3f2 /gdb/testsuite/lib/gdb.exp
parent385ab37c5b79a930f12ee05adc7d9af9f92fe578 (diff)
downloadbinutils-347775edd49c0d8f6fda3d13a39c8cac6196da30.zip
binutils-347775edd49c0d8f6fda3d13a39c8cac6196da30.tar.gz
binutils-347775edd49c0d8f6fda3d13a39c8cac6196da30.tar.bz2
[gdb/testsuite] Fix stray file in get_compiler_info
When running test-case gdb.dwarf2/gdb-index-nodebug.exp with host board local-remote-host and target board remote-gdbserver-on-localhost, I get: ... $ ls build/gdb/testsuite cache compiler.i config.log config.status gdb.log gdb.sum lib Makefile outputs site.bak site.exp temp ... The file compiler.i is there because get_compiler_info uses: ... set ppout "$outdir/compiler.i" ... The file is a temporary, and as such belongs in a temp dir. Fix this by using standard_temp_file, moving the file to build/gdb/testsuite/temp/<pid>/compiler.i. Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/lib/gdb.exp')
-rw-r--r--gdb/testsuite/lib/gdb.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index d092258..fe3f05c 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4882,7 +4882,7 @@ proc get_compiler_info {{language "c"}} {
if [is_remote host] {
# We have to use -E and -o together, despite the comments
# above, because of how DejaGnu handles remote host testing.
- set ppout "$outdir/compiler.i"
+ set ppout [standard_temp_file compiler.i]
gdb_compile "${ifile}" "$ppout" preprocess [list "$language" quiet getting_compiler_info]
set file [open $ppout r]
set cppout [read $file]