aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2002-10-23 23:57:28 +0000
committerJeff Johnston <jjohnstn@redhat.com>2002-10-23 23:57:28 +0000
commit7b8e0647739f0d0b25a8f4b812f688e8b2396bc9 (patch)
tree55a2c40eed47e6e1cb8ca5922c33ade614cc3621 /gdb/testsuite
parentfb9b6b359f5378f9b37aa13b57be30175fc2e6fa (diff)
downloadgdb-7b8e0647739f0d0b25a8f4b812f688e8b2396bc9.zip
gdb-7b8e0647739f0d0b25a8f4b812f688e8b2396bc9.tar.gz
gdb-7b8e0647739f0d0b25a8f4b812f688e8b2396bc9.tar.bz2
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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.mi/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-cmd.exp20
-rw-r--r--gdb/testsuite/gdb.mi/mi1-var-cmd.exp20
3 files changed, 47 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.mi/ChangeLog b/gdb/testsuite/gdb.mi/ChangeLog
index d383030..0a89d16 100644
--- a/gdb/testsuite/gdb.mi/ChangeLog
+++ b/gdb/testsuite/gdb.mi/ChangeLog
@@ -1,3 +1,10 @@
+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
diff --git a/gdb/testsuite/gdb.mi/mi-var-cmd.exp b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
index 26a91cf..1902793 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
@@ -288,6 +288,18 @@ mi_gdb_test "-var-assign linteger 3333" \
"\\^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"
@@ -296,6 +308,14 @@ mi_gdb_test "-var-assign lpinteger \"&linteger + 3\"" \
"\\^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"
diff --git a/gdb/testsuite/gdb.mi/mi1-var-cmd.exp b/gdb/testsuite/gdb.mi/mi1-var-cmd.exp
index 4ca8d16..0f0d522 100644
--- a/gdb/testsuite/gdb.mi/mi1-var-cmd.exp
+++ b/gdb/testsuite/gdb.mi/mi1-var-cmd.exp
@@ -288,6 +288,18 @@ mi_gdb_test "-var-assign linteger 3333" \
"\\^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"
@@ -296,6 +308,14 @@ mi_gdb_test "-var-assign lpinteger \"&linteger + 3\"" \
"\\^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"