Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [committed][gdb/testsuite] Fix unset of DEBUGINFOD_URLS in default_gdb_init
@ 2021-04-01  6:24 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2021-04-01  6:24 UTC (permalink / raw)
  To: gdb-patches

Hi,

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.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix unset of DEBUGINFOD_URLS in default_gdb_init

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.

---
 gdb/testsuite/lib/gdb.exp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 3cdc39dc819..943112fcc80 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-01  6:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01  6:24 [committed][gdb/testsuite] Fix unset of DEBUGINFOD_URLS in default_gdb_init Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox