diff options
author | Jim Ingham <jingham@apple.com> | 2000-03-13 21:51:46 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2000-03-13 21:51:46 +0000 |
commit | 73a93a3251211bf8c5774282e41dbc023820404a (patch) | |
tree | d1cedff69c4d1306c93cc4bfb59d4719026200b6 /gdb/testsuite/gdb.mi/mi-var-child.exp | |
parent | 271bb601c426b043736a308b1a5f6d36bb47857a (diff) | |
download | gdb-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/gdb.mi/mi-var-child.exp')
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-var-child.exp | 33 |
1 files changed, 18 insertions, 15 deletions
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" |