-# Copyright 2015 Free Software Foundation, Inc.
+# Copyright 2015-2016 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# We drive non-stop mode from a separate file because the whole test
# takes a while to run. This way, we can test both modes in parallel.
-set saved_gdbflags $GDBFLAGS
-append GDBFLAGS " -ex \"set non-stop on\""
+save_vars { GDBFLAGS } {
+ append GDBFLAGS " -ex \"set non-stop on\""
-source $srcdir/$subdir/checkpoint.exp
-
-set GDBFLAGS $saved_gdbflags
+ source $srcdir/$subdir/checkpoint.exp
+}