diff options
author | Tom de Vries <tdevries@suse.de> | 2021-04-01 08:24:13 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-04-01 08:24:13 +0200 |
commit | 84838a61666fbc412119f544e6973ab59dd510a4 (patch) | |
tree | 3be7cd91cc30ac9dba1b6bc9129ddde78a84f74d | |
parent | 733f5eea6bde8546a4845416457174c6d716e882 (diff) | |
download | binutils-84838a61666fbc412119f544e6973ab59dd510a4.zip binutils-84838a61666fbc412119f544e6973ab59dd510a4.tar.gz binutils-84838a61666fbc412119f544e6973ab59dd510a4.tar.bz2 |
[gdb/testsuite] Fix unset of DEBUGINFOD_URLS in default_gdb_init
In commit cfcbd506fb0 "[gdb/testsuite] Ignore DEBUGINFOD_URLS" I added
unsetting of env(DEBUGINFOD_URLS), but it doesn't work because I forgot to
add :: in front.
Fix this, and rewrite using "unset -nocomplain" instead of unsetenv, which
allows us to drop the "info exists" test.
2021-04-01 Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (default_gdb_init): Use ::env. Use unset
-nocomplain ::env(V) instead of unsetenv V.
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 3cdc39d..943112f 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -5272,9 +5272,7 @@ proc default_gdb_init { test_file_name } { # If DEBUGINFOD_URLS is set, gdb will try to download sources and # debug info for f.i. system libraries. Prevent this. - if { [info exists env(DEBUGINFOD_URLS)] } { - unsetenv DEBUGINFOD_URLS - } + unset -nocomplain ::env(DEBUGINFOD_URLS) # Ensure that GDBHISTFILE and GDBHISTSIZE are removed from the # environment, we don't want these modifications to the history |