+2002-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * mi-var-cmd.exp: Add tests to verify that a -var-assign that changes
+ a value shows up in the changelist of a -var-update. Part of fix
+ for gdb/702.
+ * mi1-var-cmd.exp: Ditto.
+
2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
* mi-return.exp: Change expected frame output to remove extraneous
"\\^done,value=\"3333\"" \
"assign to linteger"
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\\\[\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
+ "update all vars: linteger changed after assign"
+
+mi_gdb_test "-var-assign linteger 3333" \
+ "\\^done,value=\"3333\"" \
+ "assign to linteger again, same value"
+
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\\\[\\\]" \
+ "update all vars: linteger not changed after same assign"
+
mi_gdb_test "-var-evaluate-expression linteger" \
"\\^done,value=\"3333\"" \
"eval linteger"
"\\^done,value=\"$hex\"" \
"assign to lpinteger"
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\\\[\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
+ "update all vars: lpinteger changed after assign"
+
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\\\[\\\]" \
+ "update all vars: no changes on second update"
+
mi_gdb_test "-var-evaluate-expression lpinteger" \
"\\^done,value=\"$hex\"" \
"eval lpinteger"
"\\^done,value=\"3333\"" \
"assign to linteger"
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "update all vars: linteger changed after assign"
+
+mi_gdb_test "-var-assign linteger 3333" \
+ "\\^done,value=\"3333\"" \
+ "assign to linteger again, same value"
+
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\{\}" \
+ "update all vars: linteger not changed after same assign"
+
mi_gdb_test "-var-evaluate-expression linteger" \
"\\^done,value=\"3333\"" \
"eval linteger"
"\\^done,value=\"$hex\"" \
"assign to lpinteger"
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}" \
+ "update all vars: lpinteger changed after assign"
+
+mi_gdb_test "-var-update *" \
+ "\\^done,changelist=\{\}" \
+ "update all vars: no changes for second update"
+
mi_gdb_test "-var-evaluate-expression lpinteger" \
"\\^done,value=\"$hex\"" \
"eval lpinteger"