Update copyright year range in all GDB files
[external/binutils.git] / gdb / testsuite / gdb.mi / mi-var-cmd.exp
index 00dc0df..b8347cd 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2013 Free Software Foundation, Inc.
+# Copyright 1999-2018 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
@@ -30,7 +30,7 @@ if [mi_gdb_start] {
 standard_testfile var-cmd.c
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested mi-var-cmd.exp
+    untested "failed to compile"
     return -1
 }
 
@@ -50,6 +50,12 @@ mi_gdb_load ${binfile}
 
 mi_create_varobj "global_simple" "global_simple" "create global variable"
 
+# PR mi/15863
+# Attempt to update the varobj before running the inferior.
+mi_gdb_test "-var-update *" \
+       "\\^done,changelist=\\\[\\\]" \
+       "update varobj before running inferior"
+
 # Test: c_variable-1.2
 # Desc: Create non-existent variable
 
@@ -558,7 +564,13 @@ mi_gdb_test "-var-update selected_a" \
        "\\^done,changelist=\\\[\{name=\"selected_a\",in_scope=\"true\",type_changed=\"true\",new_type=\"int\",new_num_children=\"0\",has_more=\"0\"\}\\\]" \
        "update selected_a in do_special_tests"
 
-mi_gdb_test "-file-exec-and-symbols ${binfile}" "\\^done" \
+if [is_remote host] {
+    set filename ${testfile}
+} else {
+    set filename ${binfile}
+}
+
+mi_gdb_test "-file-exec-and-symbols ${filename}" "\\^done" \
     "floating varobj invalidation"
 
 mi_delete_varobj selected_a "delete selected_a"