aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2008-04-13 09:33:49 +0000
committerVladimir Prus <vladimir@codesourcery.com>2008-04-13 09:33:49 +0000
commitfcacd99f87bf1f39ba0b3fde4a71b2876c20bd70 (patch)
tree75fab46541391f348714e21c53206075958367ae /gdb/testsuite/lib
parent350fc95b2b48a859478efc3ba0ba99c56e7971aa (diff)
downloadfsf-binutils-gdb-fcacd99f87bf1f39ba0b3fde4a71b2876c20bd70.zip
fsf-binutils-gdb-fcacd99f87bf1f39ba0b3fde4a71b2876c20bd70.tar.gz
fsf-binutils-gdb-fcacd99f87bf1f39ba0b3fde4a71b2876c20bd70.tar.bz2
Fix @-varobjs.
* varobj.c (value_of_root): Update the expression for floating varobjs. * mi/mi-cmd-var.c (varobj_update_one): If type has changed, report that.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/mi-support.exp14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 317ba49..6528fb4 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -1064,6 +1064,13 @@ proc mi_create_varobj { name expression testname } {
$testname
}
+proc mi_create_floating_varobj { name expression testname } {
+ mi_gdb_test "-var-create $name @ $expression" \
+ "\\^done,name=\"$name\",numchild=\"\[0-9\]+\",value=\".*\",type=.*" \
+ $testname
+}
+
+
# Same as mi_create_varobj, but also checks the reported type
# of the varobj.
proc mi_create_varobj_checked { name expression type testname } {
@@ -1101,6 +1108,13 @@ proc mi_varobj_update { name expected testname } {
mi_gdb_test "-var-update $name" $er $testname
}
+proc mi_varobj_update_with_type_change { name new_type new_children testname } {
+ set v "{name=\"$name\",in_scope=\"true\",type_changed=\"true\",new_type=\"$new_type\",new_num_children=\"$new_children\"}"
+ set er "\\^done,changelist=\\\[$v\\\]"
+ verbose -log "Expecting: $er"
+ mi_gdb_test "-var-update $name" $er $testname
+}
+
proc mi_check_varobj_value { name value testname } {
mi_gdb_test "-var-evaluate-expression $name" \