diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2008-03-26 13:24:22 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2008-03-26 13:24:22 +0000 |
commit | 9e8e3afe379605b88ca2ab1013a2fa441534232c (patch) | |
tree | 639283566b9cd9532ad7d99f1ee2207d74f539dc /gdb/testsuite/gdb.mi/mi-var-child.exp | |
parent | c35e54f42419c844fb50cc537f4606ada454ecd6 (diff) | |
download | gdb-9e8e3afe379605b88ca2ab1013a2fa441534232c.zip gdb-9e8e3afe379605b88ca2ab1013a2fa441534232c.tar.gz gdb-9e8e3afe379605b88ca2ab1013a2fa441534232c.tar.bz2 |
* lib/mi-support.exp (mi_create_varobj_checked): New.
(mi_list_varobj_children): Allow to check for a
value.
(mi_list_array_varobj_children): New.
* gdb.mi/mi-var-child.exp: Use mi_create_varobj
and mi_list_varobj_children, as opposed to hardcoding
expected strings.
* gdb.mi/gdb701.exp: Likewise.
* gdb.mi/gdb792.exp: Likewise.
* gdb.mi/mi-var-block.exp: Likewise.
* gdb.mi/mi-var-cmd.exp: Likewise.
* gdb.mi/mi-var-invalidate.exp: Likewise.
* gdb.mi/mi2-var-block.exp: Likewise.
* gdb.mi/mi2-var-child.exp: Likewise.
* gdb.mi/mi2-var-cmd.exp: Likewise.
* gdb.mi/mi2-var-display.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi-var-child.exp')
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-var-child.exp | 537 |
1 files changed, 247 insertions, 290 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-var-child.exp b/gdb/testsuite/gdb.mi/mi-var-child.exp index bdb7a1a..29aaf7d 100644 --- a/gdb/testsuite/gdb.mi/mi-var-child.exp +++ b/gdb/testsuite/gdb.mi/mi-var-child.exp @@ -54,17 +54,28 @@ mi_continue_to_line $line_dlt_first_real "step to real start of do_children_test # Test: c_variable-4.2 # Desc: create variable "struct_declarations" -mi_gdb_test "-var-create struct_declarations * struct_declarations" \ - "\\^done,name=\"struct_declarations\",numchild=\"11\",value=\"{...}\",type=\"struct _struct_decl\"" \ +mi_create_varobj "struct_declarations" "struct_declarations" \ "create local variable struct_declarations" # Test: c_variable-4.3 # Desc: children of struct_declarations # STABS doesn't give us argument types for the func ptr structs, but # Dwarf 2 does. -mi_gdb_test "-var-list-children struct_declarations" \ - "\\^done,numchild=\"11\",children=\\\[child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"12\",type=\"long int \\\[12\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",type=\"void \\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",type=\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \ - "get children of struct_declarations" +mi_list_varobj_children "struct_declarations" { + {struct_declarations.integer integer 0 int} + {struct_declarations.character character 0 char} + {struct_declarations.char_ptr char_ptr 1 "char \\*"} + {struct_declarations.long_int long_int 0 "long int"} + {struct_declarations.int_ptr_ptr int_ptr_ptr 1 "int \\*\\*"} + {struct_declarations.long_array long_array 12 "long int \\[12\\]"} + {struct_declarations.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)"} + {struct_declarations.func_ptr_struct func_ptr_struct 0 \ + "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long int\\))?"} + {struct_declarations.func_ptr_ptr func_ptr_ptr 0 \ + "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)"} + {struct_declarations.u1 u1 4 "union \\{\\.\\.\\.\\}"} + {struct_declarations.s2 s2 4 "struct \\{\\.\\.\\.\\}"} +} "get children of struct_declarations" #gdbtk_test c_variable-4.3 {children of struct_declarations} { # get_children struct_declarations @@ -78,9 +89,8 @@ mi_gdb_test "-var-info-num-children struct_declarations" \ # Test: c_variable-4.5 # Desc: children of struct_declarations.integer -mi_gdb_test "-var-list-children struct_declarations.integer" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.integer" +mi_list_varobj_children "struct_declarations.integer" {} \ + "get children of struct_declarations.integer" # Test: c_variable-4.6 # Desc: number of children of struct_declarations.integer @@ -90,8 +100,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.integer" \ # Test: c_variable-4.7 # Desc: children of struct_declarations.character -mi_gdb_test "-var-list-children struct_declarations.character" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children "struct_declarations.character" {} \ "get children of struct_declarations.character" # Test: c_variable-4.8 @@ -102,9 +111,9 @@ mi_gdb_test "-var-info-num-children struct_declarations.character" \ # Test: c_variable-4.9 # Desc: children of struct_declarations.char_ptr -mi_gdb_test "-var-list-children struct_declarations.char_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"struct_declarations.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \ - "get children of struct_declarations.char_ptr" +mi_list_varobj_children "struct_declarations.char_ptr" { + {{struct_declarations.char_ptr.\*char_ptr} {\*char_ptr} 0 char} +} "get children of struct_declarations.char_ptr" # Test: c_variable-4.10 # Desc: number of children of struct_declarations.char_ptr @@ -114,8 +123,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.char_ptr" \ # Test: c_variable-4.11 # Desc: children of struct_declarations.long_int -mi_gdb_test "-var-list-children struct_declarations.long_int" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children "struct_declarations.long_int" {} \ "get children of struct_declarations.long_int" # Test: c_variable-4.12 @@ -126,9 +134,9 @@ mi_gdb_test "-var-info-num-children struct_declarations.long_int" \ # Test: c_variable-4.13 # Desc: children of int_ptr_ptr -mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\\\]" \ - "get children of struct_declarations.int_ptr_ptr" +mi_list_varobj_children "struct_declarations.int_ptr_ptr" { + {{struct_declarations.int_ptr_ptr.\*int_ptr_ptr} {\*int_ptr_ptr} 1 {int \*}} +} "get children of struct_declarations.int_ptr_ptr" #gdbtk_test c_variable-4.13 {children of int_ptr_ptr} { # get_children struct_declarations.int_ptr_ptr @@ -143,9 +151,8 @@ mi_gdb_test "-var-info-num-children struct_declarations.int_ptr_ptr" \ # Test: c_variable-4.15 # Desc: children of struct_declarations.long_array -mi_gdb_test "-var-list-children struct_declarations.long_array" \ - "\\^done,numchild=\"12\",children=\\\[child=\{name=\"struct_declarations.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.10\",exp=\"10\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.11\",exp=\"11\",numchild=\"0\",type=\"long int\"\}\\\]" \ - "get children of struct_declarations.long_array" +mi_list_array_varobj_children "struct_declarations.long_array" 12 "long int" \ + "get children of struct_declarations.long_array" # Test: c_variable-4.16 # Desc: number of children of struct_declarations.long_array @@ -155,11 +162,9 @@ mi_gdb_test "-var-info-num-children struct_declarations.long_array" \ # Test: c_variable-4.17 # Desc: children of struct_declarations.func_ptr -mi_gdb_test "-var-list-children struct_declarations.func_ptr" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children "struct_declarations.func_ptr" {} \ "get children of struct_declarations.func_ptr" - # Test: c_variable-4.18 # Desc: number of children of struct_declarations.func_ptr mi_gdb_test "-var-info-num-children struct_declarations.func_ptr" \ @@ -169,8 +174,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.func_ptr" \ # Test: c_variable-4.19 # Desc: children of struct_declarations.func_ptr_struct -mi_gdb_test "-var-list-children struct_declarations.func_ptr_struct" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children "struct_declarations.func_ptr_struct" {} \ "get children of struct_declarations.func_ptr_struct" # Test: c_variable-4.20 @@ -182,22 +186,23 @@ mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_struct" \ # Test: c_variable-4.21 # Desc: children of struct_declarations.func_ptr_ptr -mi_gdb_test "-var-list-children struct_declarations.func_ptr_ptr" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children "struct_declarations.func_ptr_ptr" {} \ "get children of struct_declarations.func_ptr_ptr" # Test: c_variable-4.22 # Desc: number of children of struct_declarations.func_ptr_ptr mi_gdb_test "-var-info-num-children struct_declarations.func_ptr_ptr" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.func_ptr_ptr" - + "\\^done,numchild=\"0\"" \ + "get number of children of struct_declarations.func_ptr_ptr" # Test: c_variable-4.23 # Desc: children of struct_declarations.u1 -mi_gdb_test "-var-list-children struct_declarations.u1" \ - "\\^done,numchild=\"4\",children=\\\[child=\{name=\"struct_declarations.u1.a\",exp=\"a\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.u1.b\",exp=\"b\",numchild=\"1\",type=\"char \\*\"\},child=\{name=\"struct_declarations.u1.c\",exp=\"c\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.u1.d\",exp=\"d\",numchild=\"0\",type=\"enum foo\"\}\\\]" \ - "get children of struct_declarations.u1" +mi_list_varobj_children "struct_declarations.u1" { + {struct_declarations.u1.a a 0 int} + {struct_declarations.u1.b b 1 {char \*}} + {struct_declarations.u1.c c 0 {long int}} + {struct_declarations.u1.d d 0 {enum foo}} +} "get children of struct_declarations.u1" # Test: c_variable-4.24 # Desc: number of children of struct_declarations.u1 @@ -207,9 +212,13 @@ mi_gdb_test "-var-info-num-children struct_declarations.u1" \ # Test: c_variable-4.25 # Desc: children of struct_declarations.s2 -mi_gdb_test "-var-list-children struct_declarations.s2" \ - "\\^done,numchild=\"4\",children=\\\[child=\{name=\"struct_declarations.s2.u2\",exp=\"u2\",numchild=\"3\",type=\"union \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.g\",exp=\"g\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.h\",exp=\"h\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.i\",exp=\"i\",numchild=\"10\",type=\"long int \\\[10\\\]\"\}\\\]" \ - "get children of struct_declarations.s2" +mi_list_varobj_children "struct_declarations.s2" { + {struct_declarations.s2.u2 u2 3 {union \{\.\.\.\}}} + {struct_declarations.s2.g g 0 int} + {struct_declarations.s2.h h 0 char} + {struct_declarations.s2.i i 10 {long int \[10\]}} +} "get children of struct_declarations.s2" + #gdbtk_test c_variable-4.25 {children of struct_declarations.s2} { # get_children struct_declarations.s2 #} {u2 g h i} @@ -221,119 +230,18 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2" \ "get number of children of struct_declarations.s2" -# Test: c_variable-4.27 -# Desc: children of struct_declarations.long_array.1 -mi_gdb_test "-var-list-children struct_declarations.long_array.1" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.1" - -# Test: c_variable-4.28 -# Desc: number of children of struct_declarations.long_array.1 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.1" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.1" - -# Test: c_variable-4.29 -# Desc: children of struct_declarations.long_array.2 -mi_gdb_test "-var-list-children struct_declarations.long_array.2" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.2" - -# Test: c_variable-4.30 -# Desc: number of children of struct_declarations.long_array.2 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.2" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.2" - -# Test: c_variable-4.31 -# Desc: children of struct_declarations.long_array.3 -mi_gdb_test "-var-list-children struct_declarations.long_array.3" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.3" +for {set i 1} {$i <= 9} {incr i} { + mi_list_varobj_children "struct_declarations.long_array.$i" {} \ + "get children of struct_declarations.long_array.$i" -# Test: c_variable-4.32 -# Desc: number of children of struct_declarations.long_array.3 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.3" \ + mi_gdb_test "-var-info-num-children struct_declarations.long_array.$i" \ "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.3" - -# Test: c_variable-4.33 -# Desc: children of struct_declarations.long_array.4 -mi_gdb_test "-var-list-children struct_declarations.long_array.4" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.4" - -# Test: c_variable-4.34 -# Desc: number of children of struct_declarations.long_array.4 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.4" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.4" - -# Test: c_variable-4.35 -# Desc: children of struct_declarations.long_array.5 -mi_gdb_test "-var-list-children struct_declarations.long_array.5" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.5" - -# Test: c_variable-4.36 -# Desc: number of children of struct_declarations.long_array.5 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.5" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.5" - -# Test: c_variable-4.37 -# Desc: children of struct_declarations.long_array.6 -mi_gdb_test "-var-list-children struct_declarations.long_array.6" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.6" - -# Test: c_variable-4.38 -# Desc: number of children of struct_declarations.long_array.6 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.6" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.6" - -# Test: c_variable-4.39 -# Desc: children of struct_declarations.long_array.7 -mi_gdb_test "-var-list-children struct_declarations.long_array.7" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.7" - -# Test: c_variable-4.40 -# Desc: number of children of struct_declarations.long_array.7 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.7" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.7" - -# Test: c_variable-4.41 -# Desc: children of struct_declarations.long_array.8 -mi_gdb_test "-var-list-children struct_declarations.long_array.8" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.8" - -# Test: c_variable-4.42 -# Desc: number of children of struct_declarations.long_array.8 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.8" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.8" - - -# Test: c_variable-4.43 -# Desc: children of struct_declarations.long_array.9 -mi_gdb_test "-var-list-children struct_declarations.long_array.9" \ - "\\^done,numchild=\"0\"" \ - "get children of struct_declarations.long_array.9" - -# Test: c_variable-4.44 -# Desc: number of children of struct_declarations.long_array.9 -mi_gdb_test "-var-info-num-children struct_declarations.long_array.9" \ - "\\^done,numchild=\"0\"" \ - "get number of children of struct_declarations.long_array.9" + "get number of children of struct_declarations.long_array.$i" +} # Test: c_variable-4.45 # Desc: children of struct_declarations.u1.a -mi_gdb_test "-var-list-children struct_declarations.u1.a" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children "struct_declarations.u1.a" {} \ "get children of struct_declarations.u1.a" # Test: c_variable-4.46 @@ -344,9 +252,9 @@ mi_gdb_test "-var-info-num-children struct_declarations.u1.a" \ # Test: c_variable-4.47 # Desc: children of struct_declarations.u1.b -mi_gdb_test "-var-list-children struct_declarations.u1.b" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"struct_declarations.u1.b.\\*b\",exp=\"\\*b\",numchild=\"0\",type=\"char\"\}\\\]" \ - "get children of struct_declarations.u1.b" +mi_list_varobj_children "struct_declarations.u1.b" { + {{struct_declarations.u1.b.\*b} {\*b} 0 char} +} "get children of struct_declarations.u1.b" # Test: c_variable-4.48 # Desc: number of children of struct_declarations.u1.b @@ -356,8 +264,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.u1.b" \ # Test: c_variable-4.49 # Desc: children of struct_declarations.u1.c -mi_gdb_test "-var-list-children struct_declarations.u1.c" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children "struct_declarations.u1.c" {} \ "get children of struct_declarations.u1.c" # Test: c_variable-4.50 @@ -368,8 +275,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.u1.c" \ # Test: c_variable-4.51 # Desc: children of struct_declarations.u1.d -mi_gdb_test "-var-list-children struct_declarations.u1.d" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children "struct_declarations.u1.d" {} \ "get children of struct_declarations.u1.d" @@ -382,9 +288,11 @@ mi_gdb_test "-var-info-num-children struct_declarations.u1.d" \ # Test: c_variable-4.53 # Desc: children of struct_declarations.s2.u2 -mi_gdb_test "-var-list-children struct_declarations.s2.u2" \ - "\\^done,numchild=\"3\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s1\",exp=\"u1s1\",numchild=\"4\",type=\"struct \{\\.\\.\\.\}\"\},child=\{name=\"struct_declarations.s2.u2.f\",exp=\"f\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.u2.u1s2\",exp=\"u1s2\",numchild=\"2\",type=\"struct \{\\.\\.\\.\}\"\}\\\]" \ - "get children of struct_declarations.s2.u2" +mi_list_varobj_children "struct_declarations.s2.u2" { + {"struct_declarations.s2.u2.u1s1" "u1s1" 4 {struct \{\.\.\.\}}} + {struct_declarations.s2.u2.f f 0 "long int"} + {struct_declarations.s2.u2.u1s2 u1s2 2 {struct \{\.\.\.\}}} +} "get children of struct_declarations.s2.u2" # Test: c_variable-4.54 # Desc: number of children of struct_declarations.s2.u2 @@ -394,8 +302,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2" \ # Test: c_variable-4.55 # Desc: children of struct_declarations.s2.g -mi_gdb_test "-var-list-children struct_declarations.s2.g" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children struct_declarations.s2.g {} \ "get children of struct_declarations.s2.g" # Test: c_variable-4.56 @@ -407,8 +314,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.g" \ # Test: c_variable-4.57 # Desc: children of struct_declarations.s2.h -mi_gdb_test "-var-list-children struct_declarations.s2.h" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children struct_declarations.s2.h {} \ "get children of struct_declarations.s2.h" # Test: c_variable-4.58 @@ -420,8 +326,11 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.h" \ # Test: c_variable-4.59 # Desc: children of struct_declarations.s2.i -mi_gdb_test "-var-list-children struct_declarations.s2.i" \ - "\\^done,numchild=\"10\",children=\\\[child=\{name=\"struct_declarations.s2.i.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.s2.i.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\}\\\]" \ +set t {} +for {set i 0} {$i < 10} {incr i} { + lappend t [list struct_declarations.s2.i.$i $i 0 "long int"] +} +mi_list_varobj_children struct_declarations.s2.i $t \ "get children of struct_declarations.s2.i" # Test: c_variable-4.60 @@ -432,9 +341,12 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.i" \ # Test: c_variable-4.61 # Desc: children of struct_declarations.s2.u2.u1s1 -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1" \ - "\\^done,numchild=\"4\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s1.d\",exp=\"d\",numchild=\"0\",type=\"int\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e\",exp=\"e\",numchild=\"10\",type=\"char \\\[10\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.func\",exp=\"func\",numchild=\"0\",type=\"int \\*\\(\\*\\)\\((void)?\\)\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.foo\",exp=\"foo\",numchild=\"0\",type=\"efoo\"\}\\\]" \ - "get children of struct_declarations.s2.u2.u1s1" +mi_list_varobj_children struct_declarations.s2.u2.u1s1 { + {struct_declarations.s2.u2.u1s1.d d 0 int} + {struct_declarations.s2.u2.u1s1.e e 10 {char \[10\]}} + {struct_declarations.s2.u2.u1s1.func func 0 {int \*\(\*\)\((void)?\)}} + {struct_declarations.s2.u2.u1s1.foo foo 0 efoo} +} "get children of struct_declarations.s2.u2.u1s1" # Test: c_variable-4.62 # Desc: number of children of struct_declarations.s2.u2.u1s1 @@ -444,8 +356,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1" \ # Test: c_variable-4.63 # Desc: children of struct_declarations.s2.u2.f -mi_gdb_test "-var-list-children struct_declarations.s2.u2.f" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children struct_declarations.s2.u2.f {} \ "get children of struct_declarations.s2.u2.f" # Test: c_variable-4.64 @@ -456,9 +367,10 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.f" \ # Test: c_variable-4.65 # Desc: children of struct_declarations.s2.u2.u1s2 -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2" \ - "\\^done,numchild=\"2\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr\",exp=\"array_ptr\",numchild=\"2\",type=\"char \\\[2\\\]\"\},child=\{name=\"struct_declarations.s2.u2.u1s2.func\",exp=\"func\",numchild=\"0\",type=\"int \\(\\*\\)\\((int, char \\*)?\\)\"\}\\\]" \ - "get children of struct_declarations.s2.u2.u1s2" +mi_list_varobj_children struct_declarations.s2.u2.u1s2 { + {struct_declarations.s2.u2.u1s2.array_ptr array_ptr 2 {char \[2\]}} + {struct_declarations.s2.u2.u1s2.func func 0 {int \(\*\)\((int, char \*)?\)}} +} "get children of struct_declarations.s2.u2.u1s2" # Test: c_variable-4.66 # Desc: number of children of struct_declarations.s2.u2.u1s2 @@ -468,8 +380,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2" \ # Test: c_variable-4.67 # Desc: children of struct_declarations.s2.u2.u1s1.d -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.d" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children struct_declarations.s2.u2.u1s1.d {} \ "get children of struct_declarations.s2.u2.u1s1.d" # Test: c_variable-4.68 @@ -480,8 +391,11 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.d" \ # Test: c_variable-4.69 # Desc: children of struct_declarations.s2.u2.u1s1.e -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.e" \ - "\\^done,numchild=\"10\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s1.e.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.1\",exp=\"1\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.2\",exp=\"2\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s1.e.3\",exp=\"3\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.4\",exp=\"4\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.5\",exp=\"5\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.6\",exp=\"6\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.7\",exp=\"7\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.8\",exp=\"8\",numchild=\"0\",type=\"char\"\},child=\{name=\"struct_declarations.s2.u2.u1s1.e.9\",exp=\"9\",numchild=\"0\",type=\"char\"\}\\\]" \ +set t {} +for {set i 0} {$i < 10} {incr i} { + lappend t [list struct_declarations.s2.u2.u1s1.e.$i $i 0 char] +} +mi_list_varobj_children struct_declarations.s2.u2.u1s1.e $t \ "get children of struct_declarations.s2.u2.u1s1.e" # Test: c_variable-4.70 @@ -493,8 +407,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.e" \ # Test: c_variable-4.71 # Desc: children of struct_declarations.s2.u2.u1s1.func -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.func" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children struct_declarations.s2.u2.u1s1.func {} \ "get children of struct_declarations.s2.u2.u1s1.func" # Test: c_variable-4.72 @@ -506,8 +419,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.func" \ # Test: c_variable-4.73 # Desc: children of struct_declarations.s2.u2.u1s1.foo -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s1.foo" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children struct_declarations.s2.u2.u1s1.foo {} \ "get children of struct_declarations.s2.u2.u1s1.foo" # Test: c_variable-4.74 @@ -519,9 +431,10 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s1.foo" \ # Test: c_variable-4.75 # Desc: children of struct_declarations.s2.u2.u1s2.array_ptr -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.array_ptr" \ - "\\^done,numchild=\"2\",children=\\\[child=\{name=\"struct_declarations.s2.u2.u1s2.array_ptr.0\",exp=\"0\",numchild=\"0\",type=\"char\"\},child={name=\"struct_declarations.s2.u2.u1s2.array_ptr.1\",exp=\"1\",numchild=\"0\",type=\"char\"\}\\\]" \ - "get children of struct_declarations.s2.u2.u1s2.array_ptr" +mi_list_varobj_children struct_declarations.s2.u2.u1s2.array_ptr { + {struct_declarations.s2.u2.u1s2.array_ptr.0 0 0 char} + {struct_declarations.s2.u2.u1s2.array_ptr.1 1 0 char} +} "get children of struct_declarations.s2.u2.u1s2.array_ptr" # Test: c_variable-4.76 # Desc: number of children of struct_declarations.s2.u2.u1s2.array_ptr @@ -531,8 +444,7 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.array_ptr" \ # Test: c_variable-4.77 # Desc: children of struct_declarations.s2.u2.u1s2.func -mi_gdb_test "-var-list-children struct_declarations.s2.u2.u1s2.func" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children struct_declarations.s2.u2.u1s2.func {} \ "get children of struct_declarations.s2.u2.u1s2.func" # Test: c_variable-4.78 @@ -543,10 +455,10 @@ mi_gdb_test "-var-info-num-children struct_declarations.s2.u2.u1s2.func" \ # Test: c_variable-4.79 # Desc: children of struct_declarations.int_ptr_ptr.*int_ptr_ptr -mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr.*int_ptr_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"struct_declarations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\\\]" \ - "get children of struct_declarations.int_ptr_ptr.*int_ptr_ptr" -#} {**int_ptr_ptr} +mi_list_varobj_children "struct_declarations.int_ptr_ptr.*int_ptr_ptr" { + {{struct_declarations.int_ptr_ptr.\*int_ptr_ptr.\*\*int_ptr_ptr} \ + {\*\*int_ptr_ptr} 0 int} +} "get children of struct_declarations.int_ptr_ptr.*int_ptr_ptr" # Test: c_variable-4.80 # Desc: Number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr @@ -562,15 +474,25 @@ mi_step_to do_children_tests {} ".*${srcfile}" \ # Test: c_variable-4.81 # Desc: create local variable "weird" -mi_gdb_test "-var-create weird * weird" \ - "\\^done,name=\"weird\",numchild=\"11\",value=\"$hex\",type=\"weird_struct \\*\"" \ - "create local variable weird" +mi_create_varobj weird weird "create local variable weird" # Test: c_variable-4.82 # Desc: children of 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=\"12\",type=\"long int \\\[12\\\]\"\},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 \{\\.\\.\\.\}\"\}\\\]" \ - "get children of weird" +mi_list_varobj_children "weird" { + {weird.integer integer 0 int} + {weird.character character 0 char} + {weird.char_ptr char_ptr 1 "char \\*"} + {weird.long_int long_int 0 "long int"} + {weird.int_ptr_ptr int_ptr_ptr 1 "int \\*\\*"} + {weird.long_array long_array 12 "long int \\[12\\]"} + {weird.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)"} + {weird.func_ptr_struct func_ptr_struct 0 \ + "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long int\\))?"} + {weird.func_ptr_ptr func_ptr_ptr 0 \ + "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)"} + {weird.u1 u1 4 "union \\{\\.\\.\\.\\}"} + {weird.s2 s2 4 "struct \\{\\.\\.\\.\\}"} +} "get children of weird" # Test: c_variable-4.83 # Desc: number of children of weird @@ -581,8 +503,7 @@ mi_gdb_test "-var-info-num-children weird" \ # Test: c_variable-4.84 # Desc: children of weird->long_array -mi_gdb_test "-var-list-children weird.long_array" \ - "\\^done,numchild=\"12\",children=\\\[child=\{name=\"weird.long_array.0\",exp=\"0\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.1\",exp=\"1\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.2\",exp=\"2\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.3\",exp=\"3\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.4\",exp=\"4\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.5\",exp=\"5\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.6\",exp=\"6\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.7\",exp=\"7\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.8\",exp=\"8\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.9\",exp=\"9\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.10\",exp=\"10\",numchild=\"0\",type=\"long int\"\},child=\{name=\"weird.long_array.11\",exp=\"11\",numchild=\"0\",type=\"long int\"\}\\\]" \ +mi_list_array_varobj_children weird.long_array 12 "long int" \ "get children of weird.long_array" #gdbtk_test c_variable-4.84 {children of weird->long_array} { # get_children weird.long_array @@ -596,9 +517,9 @@ mi_gdb_test "-var-info-num-children weird.long_array" \ # Test: c_variable-4.86 # Desc: children of weird.int_ptr_ptr -mi_gdb_test "-var-list-children weird.int_ptr_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr\",exp=\"\\*int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\\\]" \ - "get children of weird.int_ptr_ptr" +mi_list_varobj_children weird.int_ptr_ptr { + {{weird.int_ptr_ptr.\*int_ptr_ptr} {\*int_ptr_ptr} 1 {int \*}} +} "get children of weird.int_ptr_ptr" #gdbtk_test c_variable-4.86 {children of weird->int_ptr_ptr} { # get_children weird.int_ptr_ptr #} {*int_ptr_ptr} @@ -611,9 +532,9 @@ mi_gdb_test "-var-info-num-children weird.int_ptr_ptr" \ # Test: c_variable-4.88 # Desc: children of *weird->int_ptr_ptr -mi_gdb_test "-var-list-children weird.int_ptr_ptr.*int_ptr_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=\"\\*\\*int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\\\]" \ - "get children of weird.int_ptr_ptr.*int_ptr_ptr" +mi_list_varobj_children "weird.int_ptr_ptr.*int_ptr_ptr" { + {{weird.int_ptr_ptr.\*int_ptr_ptr.\*\*int_ptr_ptr} {\*\*int_ptr_ptr} 0 "int"} +} "get children of weird.int_ptr_ptr.*int_ptr_ptr" #gdbtk_test c_variable-4.88 {children of *weird->int_ptr_ptr} { # get_children weird.int_ptr_ptr.*int_ptr_ptr #} {**int_ptr_ptr} @@ -626,16 +547,14 @@ mi_gdb_test "-var-info-num-children weird.int_ptr_ptr.*int_ptr_ptr" \ # Test: c_variable-4.90 # Desc: create weird->int_ptr_ptr -mi_gdb_test "-var-create weird->int_ptr_ptr * weird->int_ptr_ptr" \ - "\\^done,name=\"weird->int_ptr_ptr\",numchild=\"1\",value=\"$hex\",type=\"int \\*\\*\"" \ +mi_create_varobj "weird->int_ptr_ptr" "weird->int_ptr_ptr" \ "create local variable weird->int_ptr_ptr" # Test: c_variable-4.91 # Desc: children of weird->int_ptr_ptr -mi_gdb_test "-var-list-children weird->int_ptr_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr\",exp=\"\\*weird->int_ptr_ptr\",numchild=\"1\",type=\"int \\*\"\}\\\]" \ - "get children of weird->int_ptr_ptr" - +mi_list_varobj_children "weird->int_ptr_ptr" { + {{weird->int_ptr_ptr.\*weird->int_ptr_ptr} {\*weird->int_ptr_ptr} 1 {int \*}} +} "get children of weird->int_ptr_ptr" # Test: c_variable-4.92 # Desc: number of children of (weird->int_ptr_ptr) @@ -645,9 +564,10 @@ mi_gdb_test "-var-info-num-children weird->int_ptr_ptr" \ # Test: c_variable-4.93 # Desc: children of *(weird->int_ptr_ptr) -mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"weird->int_ptr_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",exp=\"\\*\\*weird->int_ptr_ptr\",numchild=\"0\",type=\"int\"\}\\\]" \ - "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr" +mi_list_varobj_children "weird->int_ptr_ptr.*weird->int_ptr_ptr" { + {{weird->int_ptr_ptr.\*weird->int_ptr_ptr.\*\*weird->int_ptr_ptr} \ + {\*\*weird->int_ptr_ptr} 0 int} +} "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr" # Test: c_variable-4.94 # Desc: number of children of *(weird->int_ptr_ptr) @@ -657,14 +577,12 @@ mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr" \ # Test: c_variable-4.95 # Desc: children of *(*(weird->int_ptr_ptr)) -mi_gdb_test "-var-list-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children "weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" {} \ "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" # Test: c_variable-4.96 # Desc: number of children of *(*(weird->int_ptr_ptr)) -mi_gdb_test "-var-info-num-children weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children "weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" {} \ "get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_ptr" # Test: c_variable-4.97 @@ -865,13 +783,37 @@ mi_gdb_test "-var-update --all-values *" \ "\\^done,changelist=\\\[\{name=\"struct_declarations.long_array.11\",value=\"5678\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \ "update all vars struct_declarations.long_array.11 changed, print values." -mi_gdb_test "-var-list-children --all-values struct_declarations.long_array" \ - "\\^done,numchild=\"12\",children=\\\[child=\{name=\"struct_declarations.long_array.0\",exp=\"0\",numchild=\"0\",value=\"1234\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.1\",exp=\"1\",numchild=\"0\",value=\"2345\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.2\",exp=\"2\",numchild=\"0\",value=\"3456\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.3\",exp=\"3\",numchild=\"0\",value=\"4567\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.4\",exp=\"4\",numchild=\"0\",value=\"5678\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.5\",exp=\"5\",numchild=\"0\",value=\"6789\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.6\",exp=\"6\",numchild=\"0\",value=\"7890\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.7\",exp=\"7\",numchild=\"0\",value=\"8901\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.8\",exp=\"8\",numchild=\"0\",value=\"9012\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.9\",exp=\"9\",numchild=\"0\",value=\"1234\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.10\",exp=\"10\",numchild=\"0\",value=\"3456\",type=\"long int\"\},child=\{name=\"struct_declarations.long_array.11\",exp=\"11\",numchild=\"0\",value=\"5678\",type=\"long int\"\}\\\]" \ - "listing of names and values of children" - -mi_gdb_test "-var-list-children --simple-values struct_declarations" \ - "\\^done,numchild=\"11\",children=\\\[child=\{name=\"struct_declarations.integer\",exp=\"integer\",numchild=\"0\",value=\"123\",type=\"int\"\},child=\{name=\"struct_declarations.character\",exp=\"character\",numchild=\"0\",value=\"0 '\\\\\\\\0'\",type=\"char\"\},child=\{name=\"struct_declarations.char_ptr\",exp=\"char_ptr\",numchild=\"1\",value=\"$hex \\\\\"hello\\\\\"\",type=\"char \\*\"\},child=\{name=\"struct_declarations.long_int\",exp=\"long_int\",numchild=\"0\",value=\"0\",type=\"long int\"\},child=\{name=\"struct_declarations.int_ptr_ptr\",exp=\"int_ptr_ptr\",numchild=\"1\",value=\"$hex\",type=\"int \\*\\*\"\},child=\{name=\"struct_declarations.long_array\",exp=\"long_array\",numchild=\"12\",type=\"long int \\\[12\\\]\"\},child=\{name=\"struct_declarations.func_ptr\",exp=\"func_ptr\",numchild=\"0\",value=\"(@$hex: |)$hex <nothing>\",type=\"void \\(\\*\\)\\(void\\)\"\},child=\{name=\"struct_declarations.func_ptr_struct\",exp=\"func_ptr_struct\",numchild=\"0\",value=\"0\",type=\"struct _struct_decl \\(\\*\\)\\(int, char \\*, long int\\)\"\},child=\{name=\"struct_declarations.func_ptr_ptr\",exp=\"func_ptr_ptr\",numchild=\"0\",value=\"0\",type=\"struct _struct_decl \\*\\(\\*\\)\\(int, char \\*, long int\\)\"\},child=\{name=\"struct_declarations.u1\",exp=\"u1\",numchild=\"4\",type=\"union \{...\}\"\},child=\{name=\"struct_declarations.s2\",exp=\"s2\",numchild=\"4\",type=\"struct \{...\}\"\}\\\]" \ - "listing of children, simple types: names, type and values, complex types: names and types" +mi_list_varobj_children {struct_declarations.long_array --all-values} { + {struct_declarations.long_array.0 0 0 "long int" 1234} + {struct_declarations.long_array.1 1 0 "long int" 2345} + {struct_declarations.long_array.2 2 0 "long int" 3456} + {struct_declarations.long_array.3 3 0 "long int" 4567} + {struct_declarations.long_array.4 4 0 "long int" 5678} + {struct_declarations.long_array.5 5 0 "long int" 6789} + {struct_declarations.long_array.6 6 0 "long int" 7890} + {struct_declarations.long_array.7 7 0 "long int" 8901} + {struct_declarations.long_array.8 8 0 "long int" 9012} + {struct_declarations.long_array.9 9 0 "long int" 1234} + {struct_declarations.long_array.10 10 0 "long int" 3456} + {struct_declarations.long_array.11 11 0 "long int" 5678} +} "listing of names and values of children" + +mi_list_varobj_children {struct_declarations --simple-values} \ + [list \ + {struct_declarations.integer integer 0 int 123} \ + {struct_declarations.character character 0 char {0 '\\\\0'}} \ + [list struct_declarations.char_ptr char_ptr 1 "char \\*" "$hex \\\\\"hello\\\\\""] \ + {struct_declarations.long_int long_int 0 "long int" 0} \ + [list struct_declarations.int_ptr_ptr int_ptr_ptr 1 "int \\*\\*" "$hex"] \ + {struct_declarations.long_array long_array 12 "long int \\[12\\]"} \ + [list struct_declarations.func_ptr func_ptr 0 "void \\(\\*\\)\\((void)?\\)" "(@$hex: |)$hex <nothing>"] \ + {struct_declarations.func_ptr_struct func_ptr_struct 0 \ + "struct _struct_decl \\(\\*\\)(\\(int, char \\*, long int\\))?" 0} \ + {struct_declarations.func_ptr_ptr func_ptr_ptr 0 \ + "struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)" 0} \ + {struct_declarations.u1 u1 4 "union \\{\\.\\.\\.\\}"} \ + {struct_declarations.s2 s2 4 "struct \\{\\.\\.\\.\\}"} \ +] "listing of children, simple types: names, type and values, complex types: names and types" # Delete all variables mi_gdb_test "-var-delete struct_declarations" \ @@ -892,15 +834,14 @@ mi_execute_to "exec-step 43" "end-stepping-range" do_children_tests {} ".*${srcf # Test: c_variable-5.10 # Desc: create psnp->char_ptr -mi_gdb_test "-var-create psnp->char_ptr * psnp->char_ptr" \ - "\\^done,name=\"psnp->char_ptr\",numchild=\"1\",value=\".*\",type=\"char \\*\\*\\*\\*\"" \ +mi_create_varobj "psnp->char_ptr" "psnp->char_ptr" \ "create local variable psnp->char_ptr" # Test: c_variable-5.11 # Desc: children of psnp->char_ptr -mi_gdb_test "-var-list-children psnp->char_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr\",exp=\"\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\\\]" \ - "get children of psnp->char_ptr" +mi_list_varobj_children "psnp->char_ptr" { + {{psnp->char_ptr.\*psnp->char_ptr} {\*psnp->char_ptr} 1 {char \*\*\*}} +} "get children of psnp->char_ptr" # Test: c_variable-5.12 # Desc: number of children of psnp->char_ptr @@ -910,9 +851,10 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr" \ # Test: c_variable-5.13 # Desc: children of *(psnp->char_ptr) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",exp=\"\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\\\]" \ - "get children of psnp->char_ptr.*psnp->char_ptr" +mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr" { + {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr} \ + {\*\*psnp->char_ptr} 1 {char \*\*}} +} "get children of psnp->char_ptr.*psnp->char_ptr" # Test: c_variable-5.14 # Desc: number of children of *(psnp->char_ptr) @@ -922,15 +864,17 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr" \ # Test: c_variable-5.15 # Desc: children of *(*(psnp->char_ptr)) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*psnp->char_ptr\",numchild=\"1\",type=\"char \\*\"\}\\\]" \ - "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" +mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" { + {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr} \ + {\*\*\*psnp->char_ptr} 1 {char \*}} +} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" # Test: c_variable-5.15B # Desc: children of *(*(*(psnp->char_ptr))) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \ - "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr" +mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" { + {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr.\*\*\*\*psnp->char_ptr} \ + {\*\*\*\*psnp->char_ptr} 0 char} +} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" # Test: c_variable-5.16 # Desc: number of children of *(*(psnp->char_ptr)) @@ -940,9 +884,10 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ # Test: c_variable-5.17 # Desc: children of *(*(*(psnp->char_ptr))) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->char_ptr.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\\*psnp->char_ptr\",exp=\"\\*\\*\\*\\*psnp->char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \ - "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" +mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" { + {{psnp->char_ptr.\*psnp->char_ptr.\*\*psnp->char_ptr.\*\*\*psnp->char_ptr.\*\*\*\*psnp->char_ptr} \ + {\*\*\*\*psnp->char_ptr} 0 char} +} "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr" # Test: c_variable-5.18 # Desc: number of children of *(*(*(psnp->char_ptr))) @@ -952,8 +897,7 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ # Test: c_variable-5.17B # Desc: children of *(*(*(*(psnp->char_ptr)))) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children "psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" {} \ "get children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" # Test: c_variable-5.18B @@ -962,18 +906,16 @@ mi_gdb_test "-var-info-num-children psnp->char_ptr.*psnp->char_ptr.**psnp->char_ "\\^done,numchild=\"0\"" \ "get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr.****psnp->char_ptr" - # Test: c_variable-5.19 # Desc: create psnp->long_ptr -mi_gdb_test "-var-create psnp->long_ptr * psnp->long_ptr" \ - "\\^done,name=\"psnp->long_ptr\",numchild=\"1\",value=\"$hex\",type=\"long int \\*\\*\\*\\*\"" \ +mi_create_varobj "psnp->long_ptr" "psnp->long_ptr" \ "create local variable psnp->long_ptr" # Test: c_variable-5.20 # Desc: children of psnp->long_ptr -mi_gdb_test "-var-list-children psnp->long_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr\",exp=\"\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\"\}\\\]" \ - "get children of psnp->long_ptr" +mi_list_varobj_children "psnp->long_ptr" { + {{psnp->long_ptr.\*psnp->long_ptr} {\*psnp->long_ptr} 1 {long int \*\*\*}} +} "get children of psnp->long_ptr" # Test: c_variable-5.21 # Desc: number of children of psnp->long_ptr @@ -983,9 +925,9 @@ mi_gdb_test "-var-info-num-children psnp->long_ptr" \ # Test: c_variable-5.22 # Desc: children of *(psnp->long_ptr) -mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",exp=\"\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\\*\"\}\\\]" \ - "get children of psnp->long_ptr.*psnp->long_ptr" +mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr" { + {{psnp->long_ptr.\*psnp->long_ptr.\*\*psnp->long_ptr} {\*\*psnp->long_ptr} 1 {long int \*\*}} +} "get children of psnp->long_ptr.*psnp->long_ptr" # Test: c_variable-5.23 @@ -996,9 +938,10 @@ mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr" \ # Test: c_variable-5.24 # Desc: children of *(*(psnp->long_ptr)) -mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*psnp->long_ptr\",numchild=\"1\",type=\"long int \\*\"\}\\\]" \ - "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" +mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" { + {{psnp->long_ptr.\*psnp->long_ptr.\*\*psnp->long_ptr.\*\*\*psnp->long_ptr} \ + {\*\*\*psnp->long_ptr} 1 {long int \*}} +} "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr" # Test: c_variable-5.25 # Desc: number of children of *(*(psnp->long_ptr)) @@ -1008,9 +951,10 @@ mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ # Test: c_variable-5.26 # Desc: children of *(*(*(psnp->long_ptr))) -mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->long_ptr.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\\*psnp->long_ptr\",exp=\"\\*\\*\\*\\*psnp->long_ptr\",numchild=\"0\",type=\"long int\"\}\\\]" \ - "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" +mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" { + {{psnp->long_ptr.\*psnp->long_ptr.\*\*psnp->long_ptr.\*\*\*psnp->long_ptr.\*\*\*\*psnp->long_ptr} + {\*\*\*\*psnp->long_ptr} 0 {long int}} +} "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr" # Test: c_variable-5.27 # Desc: number of children of *(*(*(psnp->long_ptr))) @@ -1020,8 +964,7 @@ mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ # Test: c_variable-5.28 # Desc: children of *(*(*(*(psnp->long_ptr)))) -mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children "psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" {} \ "get children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_ptr.***psnp->long_ptr.****psnp->long_ptr" # Test: c_variable-5.29 @@ -1032,15 +975,16 @@ mi_gdb_test "-var-info-num-children psnp->long_ptr.*psnp->long_ptr.**psnp->long_ # Test: c_variable-5.30 # Desc: create psnp->ptrs -mi_gdb_test "-var-create psnp->ptrs * psnp->ptrs" \ - "\\^done,name=\"psnp->ptrs\",numchild=\"3\",value=\"\\\[3\\\]\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"" \ +mi_create_varobj "psnp->ptrs" "psnp->ptrs" \ "create local variable psnp->ptrs" # Test: c_variable-5.31 # Desc: children of psnp->ptrs -mi_gdb_test "-var-list-children psnp->ptrs" \ - "\\^done,numchild=\"3\",children=\\\[child=\{name=\"psnp->ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \ - "get children of psnp->ptrs" +mi_list_varobj_children "psnp->ptrs" { + {psnp->ptrs.0 0 4 {struct _struct_n_pointer \*}} + {psnp->ptrs.1 1 4 {struct _struct_n_pointer \*}} + {psnp->ptrs.2 2 4 {struct _struct_n_pointer \*}} +} "get children of psnp->ptrs" # Test: c_variable-5.32 # Desc: number of children of psnp->ptrs @@ -1050,9 +994,12 @@ mi_gdb_test "-var-info-num-children psnp->ptrs" \ # Test: c_variable-5.33 # Desc: children of psnp->ptrs[0] -mi_gdb_test "-var-list-children psnp->ptrs.0" \ - "\\^done,numchild=\"4\",children=\\\[child=\{name=\"psnp->ptrs.0.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \ - "get children of psnp->ptrs.0" +mi_list_varobj_children "psnp->ptrs.0" { + {psnp->ptrs.0.char_ptr char_ptr 1 {char \*\*\*\*}} + {psnp->ptrs.0.long_ptr long_ptr 1 {long int \*\*\*\*}} + {psnp->ptrs.0.ptrs ptrs 3 {struct _struct_n_pointer \*\[3\]}} + {psnp->ptrs.0.next next 4 {struct _struct_n_pointer \*}} +} "get children of psnp->ptrs.0" # Test: c_variable-5.34 # Desc: number of children of psnp->ptrs[0] @@ -1062,9 +1009,12 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0" \ # Test: c_variable-5.35 # Desc: children of psnp->ptrs[0]->next -mi_gdb_test "-var-list-children psnp->ptrs.0.next" \ - "\\^done,numchild=\"4\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \ - "get children of psnp->ptrs.0.next" +mi_list_varobj_children "psnp->ptrs.0.next" { + {psnp->ptrs.0.next.char_ptr char_ptr 1 {char \*\*\*\*}} + {psnp->ptrs.0.next.long_ptr long_ptr 1 {long int \*\*\*\*}} + {psnp->ptrs.0.next.ptrs ptrs 3 {struct _struct_n_pointer \*\[3\]}} + {psnp->ptrs.0.next.next next 4 {struct _struct_n_pointer \*}} +} "get children of psnp->ptrs.0.next" #} {char_ptr long_ptr ptrs next} @@ -1077,9 +1027,9 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next" \ # Test: c_variable-5.37 # Desc: children of psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr\",exp=\"\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\"\}\\\]" \ - "get children of psnp->ptrs.0.next.char_ptr" +mi_list_varobj_children "psnp->ptrs.0.next.char_ptr" { + {{psnp->ptrs.0.next.char_ptr.\*char_ptr} {\*char_ptr} 1 {char \*\*\*}} +} "get children of psnp->ptrs.0.next.char_ptr" #gdbtk_test c_variable-5.37 {children of psnp->ptrs[0]->next->char_ptr} { # get_children psnp->ptrs.0.next.char_ptr @@ -1093,9 +1043,9 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr" \ # Test: c_variable-5.39 # Desc: children of *psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",exp=\"\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\\*\"\}\\\]" \ - "get children of psnp->ptrs.0.next.char_ptr.*char_ptr" +mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr" { + {{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr} {\*\*char_ptr} 1 {char \*\*}} +} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr" # Test: c_variable-5.40 # Desc: number of children of *psnp->ptrs[0]->next->char_ptr @@ -1105,15 +1055,17 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr" \ # Test: c_variable-5.41 # Desc: children of **psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*char_ptr\",numchild=\"1\",type=\"char \\*\"\}\\\]" \ - "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" +mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" { + {{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr} \ + {\*\*\*char_ptr} 1 {char \*}} +} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" # Test: c_variable-5.41B # Desc: children of ***psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \ - "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" +mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" { + {{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \ + {\*\*\*\*char_ptr} 0 char} +} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr" # Test: c_variable-5.42 # Desc: number of children of **psnp->ptrs[0]->next->char_ptr @@ -1123,9 +1075,10 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ # Test: c_variable-5.43 # Desc: children of ***psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" \ - "\\^done,numchild=\"1\",children=\\\[child=\{name=\"psnp->ptrs.0.next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char_ptr\",exp=\"\\*\\*\\*\\*char_ptr\",numchild=\"0\",type=\"char\"\}\\\]" \ - "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" +mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" { + {{psnp->ptrs.0.next.char_ptr.\*char_ptr.\*\*char_ptr.\*\*\*char_ptr.\*\*\*\*char_ptr} \ + {\*\*\*\*char_ptr} 0 char} +} "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" # Test: c_variable-5.44 # Desc: number of children of ***psnp->ptrs[0]->next->char_ptr @@ -1135,8 +1088,7 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ # Test: c_variable-5.43B # Desc: children of ****psnp->ptrs[0]->next->char_ptr -mi_gdb_test "-var-list-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" \ - "\\^done,numchild=\"0\"" \ +mi_list_varobj_children "psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr.****char_ptr" {} \ "get children of psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ptr.***char_ptr" # Test: c_variable-5.44B @@ -1147,15 +1099,20 @@ mi_gdb_test "-var-info-num-children psnp->ptrs.0.next.char_ptr.*char_ptr.**char_ # Test: c_variable-5.45 # Desc: children of psnp->ptrs[0]->next->next -mi_gdb_test "-var-list-children psnp->ptrs.0.next.next" \ - "\\^done,numchild=\"4\",children=\\\[child=\{name=\"psnp->ptrs.0.next.next.char_ptr\",exp=\"char_ptr\",numchild=\"1\",type=\"char \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.long_ptr\",exp=\"long_ptr\",numchild=\"1\",type=\"long int \\*\\*\\*\\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs\",exp=\"ptrs\",numchild=\"3\",type=\"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=\{name=\"psnp->ptrs.0.next.next.next\",exp=\"next\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \ - "get children of psnp->ptrs.0.next.next" +mi_list_varobj_children "psnp->ptrs.0.next.next" { + {psnp->ptrs.0.next.next.char_ptr char_ptr 1 {char \*\*\*\*}} + {psnp->ptrs.0.next.next.long_ptr long_ptr 1 {long int \*\*\*\*}} + {psnp->ptrs.0.next.next.ptrs ptrs 3 {struct _struct_n_pointer \*\[3\]}} + {psnp->ptrs.0.next.next.next next 4 {struct _struct_n_pointer \*}} +} "get children of psnp->ptrs.0.next.next" # Test: c_variable-5.46 # Desc: children of psnp->ptrs[0]->next->next->ptrs -mi_gdb_test "-var-list-children psnp->ptrs.0.next.next.ptrs" \ - "\\^done,numchild=\"3\",children=\\\[child=\{name=\"psnp->ptrs.0.next.next.ptrs.0\",exp=\"0\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.1\",exp=\"1\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\},child=\{name=\"psnp->ptrs.0.next.next.ptrs.2\",exp=\"2\",numchild=\"4\",type=\"struct _struct_n_pointer \\*\"\}\\\]" \ - "get children of psnp->ptrs.0.next.next.ptrs" +mi_list_varobj_children "psnp->ptrs.0.next.next.ptrs" { + {psnp->ptrs.0.next.next.ptrs.0 0 4 {struct _struct_n_pointer \*}} + {psnp->ptrs.0.next.next.ptrs.1 1 4 {struct _struct_n_pointer \*}} + {psnp->ptrs.0.next.next.ptrs.2 2 4 {struct _struct_n_pointer \*}} +} "get children of psnp->ptrs.0.next.next.ptrs" # Step over "snp0.char_ptr = &b3;" mi_step_to do_children_tests {} ".*${srcfile}" \ |