* mi-var-cmd.exp: Add tests to check when varobj pinned to a
authorKeith Seitz <keiths@redhat.com>
Tue, 17 Sep 2002 20:45:28 +0000 (20:45 +0000)
committerKeith Seitz <keiths@redhat.com>
Tue, 17 Sep 2002 20:45:28 +0000 (20:45 +0000)
        selected frame changes type.

gdb/testsuite/gdb.mi/ChangeLog
gdb/testsuite/gdb.mi/mi-var-cmd.exp

index 24c4ef709975eb157fc082e5ba5aeaa597da85bc..5feba8dbc2e8a0fcc979d2585b458a77e6e0ca5f 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-17  Keith Seitz  <keiths@redhat.com>
+
+       * mi-var-cmd.exp: Add tests to check when varobj pinned to a
+       selected frame changes type.
+
 2002-09-17  Keith Seitz  <keiths@redhat.com>
 
        * mi-console.exp: Update copyright.
index 70a0d683d600ac6343c9bffe3af04d95e2370dab..8be0d8dc7d902cbf4ae78f60f62efa86cb7a47d0 100644 (file)
@@ -519,5 +519,34 @@ mi_gdb_test "-var-delete l" \
        "\\^done,ndeleted=\"1\"" \
        "delete var l"
 
+# Test whether we can follow the name of a variable through multiple
+# stack frames.
+mi_gdb_test "-break-insert do_special_tests" \
+  {\^done,bkpt=.*} \
+  "set breakpoint at do_special_tests"
+
+mi_continue_to {.*} do_special_tests {.*} {.*var-cmd.c} {.*} {stop in do_special_tests}
+
+mi_gdb_test "-var-create selected_a @ a" \
+  {\^done,name="selected_a",numchild="0",type="int"} \
+  "create selected_a"
+
+mi_gdb_test "-break-insert incr_a" \
+  {\^done,bkpt=.*} \
+  "set breakpoint at incr_a"
+
+mi_continue_to {.*} incr_a {.*} {.*var-cmd.c} {.*} {stop in incr_a}
+
+mi_gdb_test "-var-update selected_a" \
+  {\^done,changelist=\{name="selected_a",in_scope="true",new_type="char",new_num_children="0"\}} \
+  "update selected_a in incr_a"
+
+mi_next "step a line in incr_a"
+mi_next "return from incr_a to do_special_tests"
+
+mi_gdb_test "-var-update selected_a" \
+  {\^done,changelist=\{name="selected_a",in_scope="true",new_type="int",new_num_children="0"\}} \
+  "update selected_a in do_special_tests"
+
 mi_gdb_exit
 return 0