diff options
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi2-var-display.exp')
-rw-r--r-- | gdb/testsuite/gdb.mi/mi2-var-display.exp | 43 |
1 files changed, 11 insertions, 32 deletions
diff --git a/gdb/testsuite/gdb.mi/mi2-var-display.exp b/gdb/testsuite/gdb.mi/mi2-var-display.exp index a5bb29d..61f092b 100644 --- a/gdb/testsuite/gdb.mi/mi2-var-display.exp +++ b/gdb/testsuite/gdb.mi/mi2-var-display.exp @@ -65,9 +65,7 @@ gdb_expect { # Test: c_variable-6.1 # Desc: create variable bar -mi_gdb_test "-var-create bar * bar" \ - "\\^done,name=\"bar\",numchild=\"0\",type=\"int\"" \ - "create local variable bar" +mi_create_varobj bar bar "create local variable bar" # Test: c_variable-6.2 # Desc: type of variable bar @@ -119,9 +117,7 @@ mi_gdb_test "-var-delete bar" \ # Test: c_variable-6.11 # Desc: create variable foo -mi_gdb_test "-var-create foo * foo" \ - "\\^done,name=\"foo\",numchild=\"1\",type=\"int \\*\"" \ - "create local variable foo" +mi_create_varobj foo foo "create local variable foo" # Test: c_variable-6.12 # Desc: type of variable foo @@ -179,9 +175,7 @@ mi_gdb_test "-var-delete foo" \ # Test: c_variable-6.21 # Desc: create variable weird and children -mi_gdb_test "-var-create weird * weird" \ - "\\^done,name=\"weird\",numchild=\"11\",type=\"weird_struct \\*\"" \ - "create local variable weird" +mi_create_varobj weird weird "create local variable weird" mi_gdb_test "-var-list-children weird" \ "\\^done,numchild=\"11\",children=\\\[child=\{name=\"weird.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"weird.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"weird.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"weird.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"weird.long_array\",exp=\"long_array\",numchild=\"10\",type=\"long int \\\[10\\\]\"\},child=\{name=\"weird.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void|)\\)\"\},child=\{name=\"weird.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int|)\\)\"\},child=\{name=\"weird.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int|)\\)\"\},child=\{name=\"weird.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"weird.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \ @@ -344,9 +338,7 @@ gdb_expect { # Test: c_variable-7.10 # Desc: create union u -mi_gdb_test "-var-create u * u" \ - "\\^done,name=\"u\",numchild=\"2\",type=\"union named_union\"" \ - "create local variable u" +mi_create_varobj u u "create local variable u" # Test: c_variable-7.11 # Desc: value of u @@ -380,9 +372,7 @@ mi_gdb_test "-var-list-children u" \ # Test: c_variable-7.20 # Desc: create anonu -mi_gdb_test "-var-create anonu * anonu" \ - "\\^done,name=\"anonu\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"" \ - "create local variable anonu" +mi_create_varobj anonu anonu "create local variable anonu" # Test: c_variable-7.21 # Desc: value of anonu @@ -416,10 +406,7 @@ mi_gdb_test "-var-list-children anonu" \ # Test: c_variable-7.30 # Desc: create struct s -mi_gdb_test "-var-create s * s" \ - "\\^done,name=\"s\",numchild=\"6\",type=\"struct _simple_struct\"" \ - "create local variable s" - +mi_create_varobj s s "create local variable s" # Test: c_variable-7.31 # Desc: value of s @@ -454,9 +441,7 @@ mi_gdb_test "-var-list-children s" \ # Test: c_variable-7.40 # Desc: create anons -mi_gdb_test "-var-create anons * anons" \ - "\\^done,name=\"anons\",numchild=\"3\",type=\"struct \{\\.\\.\\.\}\"" \ - "create local variable anons" +mi_create_varobj anons anons "create local variable anons" # Test: c_variable-7.41 # Desc: value of anons @@ -491,9 +476,7 @@ mi_gdb_test "-var-list-children anons" \ # Test: c_variable-7.50 # Desc: create enum e -mi_gdb_test "-var-create e * e" \ - "\\^done,name=\"e\",numchild=\"0\",type=\"enum foo\"" \ - "create local variable e" +mi_create_varobj e e "create local variable e" setup_xfail "*-*-*" # Test: c_variable-7.51 @@ -529,9 +512,7 @@ mi_gdb_test "-var-list-children e" \ # Test: c_variable-7.60 # Desc: create anone -mi_gdb_test "-var-create anone * anone" \ - "\\^done,name=\"anone\",numchild=\"0\",type=\"enum \{\\.\\.\\.\}\"" \ - "create local variable anone" +mi_create_varobj anone anone "create local variable anone" setup_xfail "*-*-*" # Test: c_variable-7.61 @@ -610,12 +591,10 @@ gdb_expect { # Test: c_variable-7.81 # Desc: Create variables in different scopes -mi_gdb_test "-var-create a1 * a" \ - "\\^done,name=\"a1\",numchild=\"0\",type=\"char\"" \ - "create local variable a1" +mi_create_varobj a1 a "create local variable a1" mi_gdb_test "-var-create a2 $fp a" \ - "\\^done,name=\"a2\",numchild=\"0\",type=\"int\"" \ + "\\^done,name=\"a2\",numchild=\"0\",value=\".*\",type=\"int\"" \ "create variable a2 in different scope" #gdbtk_test c_variable-7.81 {create variables in different scopes} { |