aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-var-cmd.exp
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-01-08 23:11:47 +0000
committerDaniel Jacobowitz <drow@false.org>2007-01-08 23:11:47 +0000
commit57e66780712e5e26bd6857c0f56b537013cd17dc (patch)
treea1dd7db3641ea8d1c242c00c44e22d3df5fb5c39 /gdb/testsuite/gdb.mi/mi-var-cmd.exp
parent822b7cb4a1db8a522bcd40990687d53a99567378 (diff)
downloadgdb-57e66780712e5e26bd6857c0f56b537013cd17dc.zip
gdb-57e66780712e5e26bd6857c0f56b537013cd17dc.tar.gz
gdb-57e66780712e5e26bd6857c0f56b537013cd17dc.tar.bz2
* varobj.c (install_new_value): Always update print_value.
(value_get_print_value): Immediately return NULL for missing values. * gdb.mi/mi-var-cmd.exp: Expect lpcharacter to update when lcharacter or linteger change. Correct duplicated test name. * gdb.mi/mi2-var-cmd.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi-var-cmd.exp')
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-cmd.exp11
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-var-cmd.exp b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
index 9dfcc52..3335b5e 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
@@ -261,8 +261,8 @@ mi_execute_to "exec-step 8" "end-stepping-range" "do_locals_tests" "" \
# Note: this test also checks that lpsimple->integer and lsimple.integer have
# changed (they are the same)
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"ldouble\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lfloat\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
- "update all vars: func and lpsimple changed"
+ "\\^done,changelist=\\\[\{name=\"lsimple.integer\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lsimple->integer\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lsimple.character\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"ldouble\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lfloat\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lpcharacter\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\"\},\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
+ "update all vars: lsimple and others changed"
###
@@ -278,8 +278,13 @@ mi_gdb_test "-var-assign linteger 3333" \
"\\^done,value=\"3333\"" \
"assign to linteger"
+# Allow lpcharacter to update, optionally. Because it points to a
+# char variable instead of a zero-terminated string, if linteger is
+# directly after it in memory the printed characters may appear to
+# change.
+set lpchar_update "\{name=\"lpcharacter\",in_scope=\"true\",type_changed=\"false\"\},"
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\\\[\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
+ "\\^done,changelist=\\\[($lpchar_update)?\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars: linteger changed after assign"
mi_gdb_test "-var-assign linteger 3333" \