aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2000-03-13 21:51:46 +0000
committerJim Ingham <jingham@apple.com>2000-03-13 21:51:46 +0000
commit73a93a3251211bf8c5774282e41dbc023820404a (patch)
treed1cedff69c4d1306c93cc4bfb59d4719026200b6 /gdb/testsuite
parent271bb601c426b043736a308b1a5f6d36bb47857a (diff)
downloadgdb-73a93a3251211bf8c5774282e41dbc023820404a.zip
gdb-73a93a3251211bf8c5774282e41dbc023820404a.tar.gz
gdb-73a93a3251211bf8c5774282e41dbc023820404a.tar.bz2
2000-03-13 James Ingham <jingham@leda.cygnus.com>
Add support for a variable object that tries to evaluate itself in the currently selected frame, rather than in a fixed frame. * wrapper.c,h (gdb_parse_exp_1): Added a wrapper for gdb_parse_exp_1. * varobj.h: Added USE_CURRENT_FRAME to varobj_type & changed def'n of varobj_create. * varobj.c (varobj_list): Return type indicates whether the variable's type has changed (for current frame variables). (varobj_update): Handle the case where the variable's type has changed. (delete_variable_1): Allow for deletion of variables that have not been installed yet. (new_root_variable): Initialize use_selected_frame variable. (value_of_root): This is where most of the work to handle "current frame" variables was added. Most of the complexity involves handling the case where the type of the variable has changed. (varobj_create): Add a "type" argument, to tell if the variable is one of these "current frame" variables. Also protect call to parse_exp_1 from long jumping. * mi-var-block.exp: The error report from varobj_create changed since I am now trapping parse_exp_1 errors. Change the tests to match the new error message. * mi-var-child.exp: Ditto. * mi-var-cmd.exp: Ditto. * lib/gdb.exp: Fix the gdbtk_start routine to correctly find all the library directories. * gdbtk-varobj.c (variable_create): Pass the correct "how_specified" flag to the varobj_create routine.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.mi/ChangeLog-mi8
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-block.exp4
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-child.exp33
-rw-r--r--gdb/testsuite/gdb.mi/mi-var-cmd.exp34
-rw-r--r--gdb/testsuite/lib/gdb.exp22
6 files changed, 64 insertions, 42 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index fc372fd..caf80be 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2000-03-13 James Ingham <jingham@leda.cygnus.com>
+
+ * lib/gdb.exp: Fix the gdbtk_start routine to correctly find all
+ the library directories.
+
Mon Feb 21 13:05:36 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure.in (configdirs): Add sub directory gdb.mi.
diff --git a/gdb/testsuite/gdb.mi/ChangeLog-mi b/gdb/testsuite/gdb.mi/ChangeLog-mi
index 54cd191..b54deaa 100644
--- a/gdb/testsuite/gdb.mi/ChangeLog-mi
+++ b/gdb/testsuite/gdb.mi/ChangeLog-mi
@@ -1,3 +1,11 @@
+2000-03-13 James Ingham <jingham@leda.cygnus.com>
+
+ * mi-var-block.exp: The error report from varobj_create changed
+ since I am now trapping parse_exp_1 errors. Change the tests to
+ match the new error message.
+ * mi-var-child.exp: Ditto.
+ * mi-var-cmd.exp: Ditto.
+
2000-03-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* mi-disassemble.exp: Don't assume numbers for the offset
diff --git a/gdb/testsuite/gdb.mi/mi-var-block.exp b/gdb/testsuite/gdb.mi/mi-var-block.exp
index 7eb473d..539a58d 100644
--- a/gdb/testsuite/gdb.mi/mi-var-block.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-block.exp
@@ -62,7 +62,7 @@ mi_gdb_test "-var-create cb * cb" \
"create local variable cb"
mi_gdb_test "-var-create foo * foo" \
- "&\"No symbol \\\\\"foo\\\\\" in current context.\\\\n\".*\\^error,msg=\"No symbol \\\\\"foo\\\\\" in current context.\"" \
+ "&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
"create local variable foo"
# step to "foo = 123;"
@@ -103,7 +103,7 @@ gdb_expect {
# Test: c_variable-3.4
# Desc: check foo, cb changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"foo\",name=\"cb\"\}" \
+ "\\^done,changelist=\{name=\"foo\",in_scope=\"true\",type_changed=\"false\",name=\"cb\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars: cb foo changed"
# step to "foo = 321;"
diff --git a/gdb/testsuite/gdb.mi/mi-var-child.exp b/gdb/testsuite/gdb.mi/mi-var-child.exp
index 21a7cba..9aafced 100644
--- a/gdb/testsuite/gdb.mi/mi-var-child.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-child.exp
@@ -784,7 +784,7 @@ gdb_expect {
# Test: c_variable-5.2
# Desc: check that integer changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.integer\"\}" \
+ "\\^done,changelist=\{name=\"struct_declarations.integer\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars struct_declarations.integer"
# Step over:
@@ -805,7 +805,7 @@ gdb_expect {
# Test: c_variable-5.3
# Desc: check that char_ptr changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.char_ptr\"\}" \
+ "\\^done,changelist=\{name=\"struct_declarations.char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars struct_declarations.char_ptr"
# Step over "struct_declarations.int_ptr_ptr = &foo;"
@@ -822,7 +822,7 @@ gdb_expect {
# Test: c_variable-5.4
# Desc: check that int_ptr_ptr and children changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"weird->int_ptr_ptr\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",name=\"struct_declarations.int_ptr_ptr\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\"\}" \
+ "\\^done,changelist=\{name=\"weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars int_ptr_ptr and children changed"
# Step over "weird->long_array[0] = 1234;"
@@ -839,7 +839,7 @@ gdb_expect {
# Test: c_variable-5.5
# Desc: check that long_array[0] changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.long_array.0\"\}" \
+ "\\^done,changelist=\{name=\"struct_declarations.long_array.0\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars struct_declarations.long_array.0 changed"
# Step over "struct_declarations.long_array[1] = 2345;"
@@ -856,7 +856,7 @@ gdb_expect {
# Test: c_variable-5.6
# Desc: check that long_array[1] changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.long_array.1\"\}" \
+ "\\^done,changelist=\{name=\"struct_declarations.long_array.1\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars struct_declarations.long_array.1 changed"
# Step over "weird->long_array[2] = 3456;"
@@ -873,7 +873,7 @@ gdb_expect {
# Test: c_variable-5.7
# Desc: check that long_array[2] changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.long_array.2\"\}" \
+ "\\^done,changelist=\{name=\"struct_declarations.long_array.2\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars struct_declarations.long_array.2 changed"
# Step over:
@@ -897,7 +897,7 @@ gdb_expect {
# Test: c_variable-5.8
# Desc: check that long_array[3-9] changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.long_array.3\",name=\"struct_declarations.long_array.4\",name=\"struct_declarations.long_array.5\",name=\"struct_declarations.long_array.6\",name=\"struct_declarations.long_array.7\",name=\"struct_declarations.long_array.8\",name=\"struct_declarations.long_array.9\"\}" \
+ "\\^done,changelist=\{name=\"struct_declarations.long_array.3\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.4\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.5\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.6\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.7\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.8\",in_scope=\"true\",type_changed=\"false\",name=\"struct_declarations.long_array.9\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars struct_declarations.long_array.3-9 changed"
@@ -915,7 +915,7 @@ gdb_expect {
# Test: c_variable-5.9
# Desc: check that func_ptr changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"struct_declarations.func_ptr\"\}" \
+ "\\^done,changelist=\{name=\"struct_declarations.func_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars struct_declarations.func_ptr changed"
# Delete all variables
@@ -1185,7 +1185,7 @@ gdb_expect {
# Test: c_variable-5.47
# Desc: check that psnp->char_ptr (and [0].char_ptr) changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"psnp->ptrs.0.char_ptr\",name=\"psnp->char_ptr\",name=\"psnp->char_ptr.\\*psnp->char_ptr\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\"\}" \
+ "\\^done,changelist=\{name=\"psnp->ptrs.0.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars psnp->char_ptr (and 0.char_ptr) changed"
# Step over "snp1.char_ptr = &c3;"
@@ -1203,7 +1203,7 @@ gdb_expect {
# Test: c_variable-5.48
# Desc: check that psnp->next->char_ptr (and [1].char_ptr) changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"psnp->ptrs.0.next.char_ptr\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\"\}" \
+ "\\^done,changelist=\{name=\"psnp->ptrs.0.next.char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars psnp->next->char_ptr (and 1.char_ptr) changed"
@@ -1222,7 +1222,7 @@ gdb_expect {
# Test: c_variable-5.49
# Desc: check that psnp->next->next->char_ptr (and [2].char_ptr) changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.char_ptr\"\}" \
+ "\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.char_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars psnp->next->next->char_ptr (and 2.char_ptr) changed"
@@ -1240,7 +1240,7 @@ gdb_expect {
# Test: c_variable-5.50
# Desc: check that psnp->long_ptr (and [0].long_ptr) changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"psnp->ptrs.0.long_ptr\",name=\"psnp->long_ptr\",name=\"psnp->long_ptr.\\*psnp->long_ptr\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\"\}" \
+ "\\^done,changelist=\{name=\"psnp->ptrs.0.long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\",name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars psnp->long_ptr (and 0.long_ptr) changed"
@@ -1258,12 +1258,15 @@ gdb_expect {
# Test: c_variable-5.51
# Desc: check that psnp->next->long_ptr (and [1].long_ptr) changed
+# Why does this have a FIXME?
+setup_xfail *-*-*
mi_gdb_test "-var-update *" \
- "FIXME\\^done,changelist=\{name=\"psnp->ptrs.0.next.long_ptr\"\}" \
+ "FIXME\\^done,changelist=\{name=\"psnp->ptrs.0.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars psnp->next->long_ptr (and 1.long_ptr) changed"
+clear_xfail *-*-*
# This command produces this error message:
-# &"warning: varobj_list: assertion failed - mycount <> 0\n"^M
+# &"warning: varobj_list: assertion failed - mycount <> 0\n"
#
# Step over "snp2.long_ptr = &z3;"
@@ -1281,7 +1284,7 @@ gdb_expect {
# Test: c_variable-5.52
# Desc: check that psnp->next->next->long_ptr (and [2].long_ptr) changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.long_ptr\"\}" \
+ "\\^done,changelist=\{name=\"psnp->ptrs.0.next.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars psnp->next->next->long_ptr (and 2.long_ptr) changed"
diff --git a/gdb/testsuite/gdb.mi/mi-var-cmd.exp b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
index 7b4ebcc..f1fcedd 100644
--- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp
+++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp
@@ -59,14 +59,14 @@ mi_gdb_test "111-var-create global_simple * global_simple" \
# Desc: Create non-existent variable
mi_gdb_test "112-var-create bogus_unknown_variable * bogus_unknown_variable" \
- "&\"No symbol \\\\\"bogus_unknown_variable\\\\\" in current context.\\\\n\".*112\\^error,msg=\"No symbol \\\\\"bogus_unknown_variable\\\\\" in current context.\"" \
+ "&\"mi_cmd_var_create: unable to create variable object\\\\n\".*112\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
"create non-existent variable"
# Test: c_variable-1.3
# Desc: Create out of scope variable
mi_gdb_test "113-var-create argc * argc" \
- "&\"No symbol \\\\\"argc\\\\\" in current context.\\\\n\".*113\\^error,msg=\"No symbol \\\\\"argc\\\\\" in current context.\"" \
+ "&\"mi_cmd_var_create: unable to create variable object\\\\n\".*113\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
"create out of scope variable"
mi_gdb_test "200-break-insert do_locals_tests" \
@@ -192,7 +192,7 @@ gdb_expect {
# Test: c_variable-2.2
# Desc: check whether only linteger changed values
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"linteger\"\}" \
+ "\\^done,changelist=\{name=\"linteger\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars: linteger changed"
# Step over "lpinteger = &linteger;"
@@ -209,7 +209,7 @@ gdb_expect {
# Test: c_variable-2.3
# Desc: check whether only lpinteger changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"lpinteger\"\}" \
+ "\\^done,changelist=\{name=\"lpinteger\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars: lpinteger changed"
# Step over "lcharacter = 'a';"
@@ -226,7 +226,7 @@ gdb_expect {
# Test: c_variable-2.4
# Desc: check whether only lcharacter changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"lcharacter\"\}" \
+ "\\^done,changelist=\{name=\"lcharacter\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars: lcharacter changed"
# Step over "lpcharacter = &lcharacter;"
@@ -243,7 +243,7 @@ gdb_expect {
# Test: c_variable-2.5
# Desc: check whether only lpcharacter changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"lpcharacter\"\}" \
+ "\\^done,changelist=\{name=\"lpcharacter\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars: lpcharacter changed"
@@ -272,7 +272,7 @@ gdb_expect {
# Desc: check whether llong, lplong, lfloat, lpfloat, ldouble, lpdouble, lsimple.integer,
# lsimple.unsigned_character lsimple.integer lsimple.character changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"lsimple.integer\",name=\"lsimple->integer\",name=\"lsimple.character\",name=\"lpdouble\",name=\"ldouble\",name=\"lpfloat\",name=\"lfloat\",name=\"lplong\",name=\"llong\"\}" \
+ "\\^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=\"lpdouble\",in_scope=\"true\",type_changed=\"false\",name=\"ldouble\",in_scope=\"true\",type_changed=\"false\",name=\"lpfloat\",in_scope=\"true\",type_changed=\"false\",name=\"lfloat\",in_scope=\"true\",type_changed=\"false\",name=\"lplong\",in_scope=\"true\",type_changed=\"false\",name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars: many changed"
# Step over:
@@ -294,7 +294,7 @@ gdb_expect {
# Test: c_variable-2.7
# Desc: check whether (lsimple.signed_character, lsimple.char_ptr) lpsimple, func changed
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"func\",name=\"lpsimple\"\}" \
+ "\\^done,changelist=\{name=\"func\",in_scope=\"true\",type_changed=\"false\",name=\"lpsimple\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars: func and lpsimple changed"
# Step over
@@ -323,7 +323,7 @@ gdb_expect {
# 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\",name=\"lsimple->integer\",name=\"lsimple.character\",name=\"ldouble\",name=\"lfloat\",name=\"llong\",name=\"lcharacter\",name=\"linteger\"\}" \
+ "\\^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"
@@ -454,7 +454,7 @@ mi_gdb_test "-var-create l * l" \
# Test: c_variable-2.11
# Desc: create do_locals_tests local in subroutine1
mi_gdb_test "-var-create linteger * linteger" \
- "&\"No symbol \\\\\"linteger\\\\\" in current context.\\\\n\".*\\^error,msg=\"No symbol \\\\\"linteger\\\\\" in current context.\"" \
+ "&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,msg=\"mi_cmd_var_create: unable to create variable object\"" \
"create linteger"
send_gdb "-exec-step\n"
@@ -471,10 +471,14 @@ gdb_expect {
# Desc: change global_simple.integer
# Note: This also tests whether we are reporting changes in structs properly.
# gdb normally would say that global_simple has changed, but we
-# special case that, since it is not what a human expects to see.
+# special case that, since it is not what a human expects to
+# see.
+
+setup_xfail *-*-*
mi_gdb_test "-var-update *" \
"\\^done,changelist=\{FIXME: WHAT IS CORRECT HERE\}" \
"update all vars: changed FIXME"
+clear_xfail *-*-*
send_gdb "-exec-step\n"
gdb_expect {
@@ -487,7 +491,7 @@ gdb_expect {
# Test: c_variable-2.13
# Desc: change subroutine1 local i
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"i\"\}" \
+ "\\^done,changelist=\{name=\"i\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars: i changed"
send_gdb "-exec-step\n"
@@ -501,7 +505,7 @@ gdb_expect {
# Test: c_variable-2.14
# Desc: change do_locals_tests local llong
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{name=\"llong\"\}" \
+ "\\^done,changelist=\{name=\"llong\",in_scope=\"true\",type_changed=\"false\"\}" \
"update all vars: llong changed"
send_gdb "-exec-next\n"
@@ -515,8 +519,8 @@ gdb_expect {
# Test: c_variable-2.15
# Desc: check for out of scope subroutine1 locals
mi_gdb_test "-var-update *" \
- "\\^done,changelist=\{\}" \
- "update all vars: none changed"
+ "\\^done,changelist=\{name=\"l\",in_scope=\"false\",name=\"i\",in_scope=\"false\"\}" \
+ "update all vars: all now out of scope"
# Done with locals/globals tests. Erase all variables
#delete_all_variables
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 1a5ecc8..191bf18 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1617,29 +1617,31 @@ proc gdbtk_start {test} {
}
}
+
set wd [pwd]
- cd [file join $srcdir .. gdbtk library]
+ cd $srcdir
+ set abs_srcdir [pwd]
+ cd [file join $abs_srcdir .. gdbtk library]
set env(GDBTK_LIBRARY) [pwd]
- cd [file join $srcdir .. .. tcl library]
+ cd [file join $abs_srcdir .. .. tcl library]
set env(TCL_LIBRARY) [pwd]
- cd [file join $srcdir .. .. tk library]
+ cd [file join $abs_srcdir .. .. tk library]
set env(TK_LIBRARY) [pwd]
- cd [file join $srcdir .. .. tix library]
+ cd [file join $abs_srcdir .. .. tix library]
set env(TIX_LIBRARY) [pwd]
- cd [file join $srcdir .. .. itcl itcl library]
+ cd [file join $abs_srcdir .. .. itcl itcl library]
set env(ITCL_LIBRARY) [pwd]
- cd [file join .. $srcdir .. .. libgui library]
+ cd [file join .. $abs_srcdir .. .. libgui library]
set env(CYGNUS_GUI_LIBRARY) [pwd]
cd $wd
- cd [file join $srcdir $subdir]
+ cd [file join $abs_srcdir $subdir]
set env(DEFS) [file join [pwd] defs]
cd $wd
cd [file join $objdir $subdir]
set env(OBJDIR) [pwd]
cd $wd
- cd $srcdir
- set env(SRCDIR) [pwd]
- cd $wd
+
+ set env(SRCDIR) $abs_srcdir
set env(GDBTK_VERBOSE) 1
set env(GDBTK_LOGFILE) [file join $objdir gdb.log]
set env(GDBTK_TEST_RUNNING) 1