+2018-03-23  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
+       * gdb.ada/exec_changed.exp: Replace "target_info exists
+       use_gdb_stub" by "use_gdb_stub".
+       * gdb.ada/start.exp: Likewise.
+       * gdb.base/async-shell.exp: Likewise.
+       * gdb.base/attach-pie-misread.exp: Likewise.
+       * gdb.base/attach-wait-input.exp: Likewise.
+       * gdb.base/break-entry.exp: Likewise.
+       * gdb.base/break-interp.exp: Likewise.
+       * gdb.base/dprintf-detach.exp: Likewise.
+       * gdb.base/nostdlib.exp: Likewise.
+       * gdb.base/solib-nodir.exp: Likewise.
+       * gdb.base/statistics.exp: Likewise.
+       * gdb.base/testenv.exp: Likewise.
+       * gdb.mi/mi-exec-run.exp: Likewise.
+       * gdb.mi/mi-start.exp: Likewise.
+       * gdb.multi/dummy-frame-restore.exp: Likewise.
+       * gdb.multi/multi-arch-exec.exp: Likewise.
+       * gdb.multi/multi-arch.exp: Likewise.
+       * gdb.multi/tids.exp: Likewise.
+       * gdb.multi/watchpoint-multi.exp: Likewise.
+       * gdb.python/py-events.exp: Likewise.
+       * gdb.threads/attach-into-signal.exp: Likewise.
+       * gdb.threads/attach-stopped.exp: Likewise.
+       * gdb.threads/threadapply.exp: Likewise.
+       * lib/selftest-support.exp: Likewise.
+
 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
        * gdb.base/info-proc.exp: Add test for "info proc cmdline".
 
 
 # This testcase verifies the behavior of the `start' command, which
 # does not work when we use the gdb stub...
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
     untested "skipping tests due to use_gdb_stub"
     return
 }
 
 
 # This testcase verifies the behavior of the `start' command, which
 # does not work when we use the gdb stub...
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
     untested "skipping test due to gdb stub"
     return
 }
 
 }
 
 # The testfile uses "run".  The real bug happened only for ![is_remote target].
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
     return 0
 }
 
 
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This test only works on GNU/Linux.
-if { ![isnative] || [is_remote host] || [target_info exists use_gdb_stub]
+if { ![isnative] || [is_remote host] || [use_gdb_stub]
      || ![istarget *-linux*] || [skip_shlib_tests]} {
     continue
 }
 
 # simpler to do, so we test with both editing on and off.
 
 # The test uses the "attach" command.
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
     return
 }
 
 
 
 standard_testfile start.c
 
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
     untested "skipping tests due to use_gdb_stub"
     return
 }
 
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This test only works on GNU/Linux.
-if { ![isnative] || [is_remote host] || [target_info exists use_gdb_stub]
+if { ![isnative] || [is_remote host] || [use_gdb_stub]
      || ![istarget *-linux*] || [skip_shlib_tests]} {
     continue
 }
 
 load_lib gdbserver-support.exp
 
 # The test relies on "detach/attach".
-if { [target_info exists use_gdb_stub] } then {
+if { [use_gdb_stub] } then {
     return 0
 }
 
 
 # If we're using a stub, breakpoints at the entry point will not trigger.
 # See also the comment in break-entry.exp.
 
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
     untested "skipping tests due to use_gdb_stub"
     return
 }
 
 # We need to be able to influence the target's environment and working
 # directory.  Can't do that if when we connect the inferior is already
 # running.
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
     return
 }
 
 
 gdb_exit
 
 # Inlined default_gdb_start.
-set use_gdb_stub [target_info exists use_gdb_stub]
+set use_gdb_stub [use_gdb_stub]
 set res [remote_spawn host "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS [host_info gdb_opts] -statistics"]
 if { $res < 0 || $res == "" } {
     perror "Spawning $GDB failed."
 
 
 # Can't pass environment variables to the inferior if when we connect,
 # the inferior is already running.
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
     return
 }
 
 
 
 # The purpose of this testcase is to test the -exec-run command. If we
 # cannot use it, then there is no point in running this testcase.
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
      untested "cannot use -exec-run command"
      return -1
 }
 
 # The purpose of this testcase is to test the --start option of
 # the -exec-run command. If we cannot use the -exec-run command,
 # then there is no point in running this testcase...
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
      untested "cannot use -exec-run command"
      return -1
 }
 
 set executable ${testfile}
 
 # The plain remote target can't do multiple inferiors.
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
     return
 }
 
 
 set testfile "multi-arch-exec"
 
 # The plain remote target can't do multiple inferiors.
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
     return
 }
 
 
 set testfile "multi-arch"
 
 # The plain remote target can't do multiple inferiors.
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
     return
 }
 
 
 # Multiple inferiors are needed, therefore both native and extended
 # gdbserver modes are supported.  Only non-extended gdbserver is not
 # supported.
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
     untested "using gdb stub"
     return
 }
 
 
 # Multiple inferiors are needed, therefore both native and extended gdbserver
 # modes are supported.  Only non-extended gdbserver is not supported.
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
     untested "using gdb stub"
     return
 }
 
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if [target_info exists use_gdb_stub] {
+if [use_gdb_stub] {
     return 0
 }
 
 
 # This file was created by Jan Kratochvil <jan.kratochvil@redhat.com>.
 
 # This test only works on Linux
-if { ![isnative] || [is_remote host] || [target_info exists use_gdb_stub]
+if { ![isnative] || [is_remote host] || [use_gdb_stub]
      || ![istarget *-linux*] } {
     continue
 }
 
 # This file was updated by Jan Kratochvil <jan.kratochvil@redhat.com>.
 
 # This test only works on Linux
-if { ![isnative] || [is_remote host] || [target_info exists use_gdb_stub]
+if { ![isnative] || [is_remote host] || [use_gdb_stub]
      || ![istarget *-linux*] } {
     continue
 }
 
 
     # The test starts multiple inferiors, therefore non-extended
     # remote is not supported.
-    if [target_info exists use_gdb_stub] {
+    if [use_gdb_stub] {
        unsupported "using gdb stub"
        return
     }
 
     # ... or with a stub-like server?  I.e., gdbserver + "target
     # remote"?  In that case we won't be able to pass command line
     # arguments to GDB, and selftest_setup wants to do exactly that.
-    if [target_info exists use_gdb_stub] {
+    if [use_gdb_stub] {
        return
     }