From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 451 invoked by alias); 26 Mar 2008 13:30:47 -0000 Received: (qmail 32667 invoked by uid 22791); 26 Mar 2008 13:30:24 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 26 Mar 2008 13:29:58 +0000 Received: (qmail 30249 invoked from network); 26 Mar 2008 13:29:54 -0000 Received: from unknown (HELO localhost) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 26 Mar 2008 13:29:54 -0000 From: Vladimir Prus To: gdb-patches@sources.redhat.com Subject: Cleanup MI testsuite Date: Wed, 26 Mar 2008 13:30:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_R/k6HKohLRzVSd8" Message-Id: <200803261629.53454.vladimir@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00395.txt.bz2 --Boundary-00=_R/k6HKohLRzVSd8 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 1481 When I've checked in the patch to implement per-thread varobjs, I've implicitly assumed that MI output does not change in single-threaded programs, so no testsuite update is necessary. However, that's not necessary true, and with Pedro's recent patch, is not true on x86. Updating the testsuite should be trivial, except that MI testsuite is poorly designed: - Just about every test uses regular expression that the output much match - The expression is too rigid, so a new field in the output breaks it. So, I've checked in the below patch that makes just about every test for -var-create and -var-list-children use helper functions. Along the way, it allows the thread-id field in the output of those commands. Testing on x86 with and without printing of thread id for varobjs shows no issues. - Volodya 2008-03-26 Vladimir Prus * 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. --Boundary-00=_R/k6HKohLRzVSd8 Content-Type: text/x-diff; charset="utf-8"; name="commit.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="commit.diff" Content-length: 166534 ? commit.diff ? gdb.mi/A.diff ? gdb.mi/B.diff ? gdb.mi/THE_BIG_FIX.diff Index: gdb.mi/gdb701.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/gdb701.exp,v retrieving revision 1.7 diff -u -p -r1.7 gdb701.exp --- gdb.mi/gdb701.exp 1 Jan 2008 22:53:20 -0000 1.7 +++ gdb.mi/gdb701.exp 26 Mar 2008 13:14:42 -0000 @@ -49,9 +49,7 @@ mi_run_to_main # Step over "foo =3D 0" mi_next "step over \"foo =3D 0\"" =20 -mi_gdb_test "-var-create fooPtr * foo" \ - "(&\".*\"\r\n)*\\^done,name=3D\"fooPtr\",numchild=3D\"3\",value=3D\".*\"= ,type=3D\"Foo \\*\"" \ - "create fooPtr" +mi_create_varobj "fooPtr" "foo" "create fooPtr" =20 mi_gdb_test "-var-list-children fooPtr" \ "(&\".*\"\r\n)*\\^done,numchild=3D\"3\",.*" \ Index: gdb.mi/gdb792.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/gdb792.exp,v retrieving revision 1.9 diff -u -p -r1.9 gdb792.exp --- gdb.mi/gdb792.exp 1 Jan 2008 22:53:20 -0000 1.9 +++ gdb.mi/gdb792.exp 26 Mar 2008 13:14:42 -0000 @@ -48,45 +48,50 @@ if {[gdb_compile $srcdir/$subdir/$srcfil # Run to main mi_run_to_main =20 -mi_gdb_test "-var-create - * a" \ - "(&\".*\"\r\n)*\\^done,name=3D\"var1\",numchild=3D\"3\",value=3D\".*\",t= ype=3D\"A\"" \ - "create var for class A" - -mi_gdb_test "-var-list-children var1" \ - "(&\".*\"\r\n)*\\^done,numchild=3D\"3\",children=3D\\\[child=3D\{name=3D= \"var1\.public\",exp=3D\"public\",numchild=3D\"2\"\},child=3D\{name=3D\"var= 1\.private\",exp=3D\"private\",numchild=3D\"2\"\},child=3D\{name=3D\"var1\.= protected\",exp=3D\"protected\",numchild=3D\"2\"\}\\\]" \ - "list children of class A" - -mi_gdb_test "-var-list-children var1.public" \ - "(&\".*\"\r\n)*\\^done,numchild=3D\"2\",children=3D\\\[child=3D\{name=3D= \"var1\.public\.x\",exp=3D\"x\",numchild=3D\"0\",type=3D\"int\"\},child=3D\= {name=3D\"var1\.public\.buffer\",exp=3D\"buffer\",numchild=3D\"10\",type=3D= \"char \\\[10\\\]\"\}\\\]" \ - "list children of A.public" - -mi_gdb_test "-var-list-children var1.private" \ - "(&\".*\"\r\n)*\\^done,numchild=3D\"2\",children=3D\\\[child=3D\{name=3D= \"var1\.private\.u\",exp=3D\"u\",numchild=3D\"0\",type=3D\"int\"\},child=3D= \{name=3D\"var1\.private\.z\",exp=3D\"z\",numchild=3D\"0\",type=3D\"float\"= \}\\\]" \ - "list children of A.private" - -mi_gdb_test "-var-list-children var1.protected" \ - "(&\".*\"\r\n)*\\^done,numchild=3D\"2\",children=3D\\\[child=3D\{name=3D= \"var1\.protected\.y\",exp=3D\"y\",numchild=3D\"0\",type=3D\"int\"\},child= =3D\{name=3D\"var1\.protected\.b\",exp=3D\"b\",numchild=3D\"2\",type=3D\"B\= "\}\\\]" \ - "list children of A.protected" - -mi_gdb_test "-var-list-children var1.protected.b" \ - "(&\".*\"\r\n)*\\^done,numchild=3D\"2\",children=3D\\\[child=3D\{name=3D= \"var1\.protected\.b\.public\",exp=3D\"public\",numchild=3D\"2\"\},child=3D= \{name=3D\"var1\.protected\.b\.private\",exp=3D\"private\",numchild=3D\"1\"= \}\\\]" \ - "list children of A.protected.b" - -mi_gdb_test "-var-list-children var1.protected.b.public" \ - "(&\".*\"\r\n)*\\^done,numchild=3D\"2\",children=3D\\\[child=3D\{name=3D= \"var1\.protected\.b\.public\.bx\",exp=3D\"bx\",numchild=3D\"0\",type=3D\"i= nt\"\},child=3D\{name=3D\"var1\.protected\.b\.public\.by\",exp=3D\"by\",num= child=3D\"0\",type=3D\"int\"\}\\\]" \ - "list children of A.protected.b.public" - -mi_gdb_test "-var-list-children var1.protected.b.private" \ - "(&\".*\"\r\n)*\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D= \"var1\.protected\.b\.private\.k\",exp=3D\"k\",numchild=3D\"0\",type=3D\"in= t\"\}\\\]" \ - "list children of A.protected.b.private" - -mi_gdb_test "-var-create - * c" \ - "(&\".*\"\r\n)*\\^done,name=3D\"var2\",numchild=3D\"3\",value=3D\".*\",t= ype=3D\"C\"" \ - "create var for class C which has baseclass A" - -mi_gdb_test "-var-list-children var2" \ - "(&\".*\"\r\n)*\\^done,numchild=3D\"3\",children=3D\\\[child=3D\{name=3D= \"var2\.A\",exp=3D\"A\",numchild=3D\"3\",type=3D\"A\"\},child=3D\{name=3D\"= var2\.public\",exp=3D\"public\",numchild=3D\"1\"\},child=3D\{name=3D\"var2\= .private\",exp=3D\"private\",numchild=3D\"1\"\}\\\]" \ - "list children of class C" +mi_create_varobj "var1" "a" "create var for class A" + +mi_list_varobj_children "var1" { + {var1.public public 2} + {var1.private private 2}=20 + {var1.protected protected 2} +} "list children of class A" + +mi_list_varobj_children "var1.public" { + {var1.public.x x 0 int} + {var1.public.buffer buffer 10 {char \[10\]}} +} "list children of A.public" + +mi_list_varobj_children "var1.private" { + {var1.private.u u 0 int} + {var1.private.z z 0 float} +} "list children of A.private" + +mi_list_varobj_children "var1.protected" { + {var1.protected.y y 0 int} + {var1.protected.b b 2 B} +} "list children of A.protected" + +mi_list_varobj_children "var1.protected.b" { + {var1.protected.b.public public 2} + {var1.protected.b.private private 1} +} "list children of A.protected.b" + +mi_list_varobj_children "var1.protected.b.public" { + {var1.protected.b.public.bx bx 0 int} + {var1.protected.b.public.by by 0 int} +} "list children of A.protected.b.public" + +mi_list_varobj_children "var1.protected.b.private" { + {var1.protected.b.private.k k 0 int} +} "list children of A.protected.b.private" + +mi_create_varobj "var2" "c" "create var for class C which has baseclass A" + +mi_list_varobj_children "var2" { + {var2.A A 3 A} + {var2.public public 1} + {var2.private private 1} +} "list children of class C" =20 mi_gdb_exit return 0 Index: gdb.mi/mi-var-block.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-block.exp,v retrieving revision 1.17 diff -u -p -r1.17 mi-var-block.exp --- gdb.mi/mi-var-block.exp 1 Jan 2008 22:53:20 -0000 1.17 +++ gdb.mi/mi-var-block.exp 26 Mar 2008 13:14:42 -0000 @@ -44,13 +44,11 @@ mi_runto do_block_tests =20 # Test: c_variable-3.2 # Desc: create cb and foo -mi_gdb_test "-var-create cb * cb" \ - "\\^done,name=3D\"cb\",numchild=3D\"0\",value=3D\".*\",type=3D\"int\"" \ - "create local variable cb" +mi_create_varobj "cb" "cb" "create local variable cb" =20 mi_gdb_test "-var-create foo * foo" \ - "&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,= msg=3D\"mi_cmd_var_create: unable to create variable object\"" \ - "create local variable foo" + "&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^= error,msg=3D\"mi_cmd_var_create: unable to create variable object\"" \ + "try to create local variable foo" =20 # step to "foo =3D 123;" mi_step_to "do_block_tests" "" "var-cmd.c" \ @@ -66,9 +64,7 @@ mi_gdb_test "-var-delete foo" \ =20 # Test: c_variable-3.3 # Desc: create foo -mi_gdb_test "-var-create foo * foo" \ - "\\^done,name=3D\"foo\",numchild=3D\"0\",value=3D\".*\",type=3D\"int\"" \ - "create local variable foo" +mi_create_varobj "foo" "foo" "create local variable foo" =20 # step to "foo2 =3D 123;" mi_step_to "do_block_tests" "" "var-cmd.c" \ @@ -88,9 +84,7 @@ mi_step_to "do_block_tests" "" "var-cmd. =20 # Test: c_variable-3.5 # Desc: create inner block foo -mi_gdb_test "-var-create inner_foo * foo" \ - "\\^done,name=3D\"inner_foo\",numchild=3D\"0\",value=3D\".*\",type=3D\"in= t\"" \ - "create local variable inner_foo" +mi_create_varobj "inner_foo" "foo" "create local variable inner_foo" =20 # step to "foo2 =3D 0;" mi_step_to "do_block_tests" "" "var-cmd.c" \ @@ -99,9 +93,7 @@ mi_step_to "do_block_tests" "" "var-cmd. =20 # Test: c_variable-3.6 # Desc: create foo2 -mi_gdb_test "-var-create foo2 * foo2" \ - "\\^done,name=3D\"foo2\",numchild=3D\"0\",value=3D\".*\",type=3D\"int\"" \ - "create local variable foo2" +mi_create_varobj "foo2" "foo2" "create local variable foo2" =20 # Test: c_variable-3.7 # Desc: check that outer foo in scope and inner foo out of scope Index: gdb.mi/mi-var-child.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-child.exp,v retrieving revision 1.30 diff -u -p -r1.30 mi-var-child.exp --- gdb.mi/mi-var-child.exp 17 Jan 2008 14:34:22 -0000 1.30 +++ gdb.mi/mi-var-child.exp 26 Mar 2008 13:14:42 -0000 @@ -54,17 +54,28 @@ mi_continue_to_line $line_dlt_first_real =20 # Test: c_variable-4.2 # Desc: create variable "struct_declarations" -mi_gdb_test "-var-create struct_declarations * struct_declarations" \ - "\\^done,name=3D\"struct_declarations\",numchild=3D\"11\",value=3D\"{...}= \",type=3D\"struct _struct_decl\"" \ +mi_create_varobj "struct_declarations" "struct_declarations" \ "create local variable struct_declarations" =20 # 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=3D\"11\",children=3D\\\[child=3D\{name=3D\"struct_decla= rations.integer\",exp=3D\"integer\",numchild=3D\"0\",type=3D\"int\"\},child= =3D\{name=3D\"struct_declarations.character\",exp=3D\"character\",numchild= =3D\"0\",type=3D\"char\"\},child=3D{name=3D\"struct_declarations.char_ptr\"= ,exp=3D\"char_ptr\",numchild=3D\"1\",type=3D\"char \\*\"\},child=3D\{name= =3D\"struct_declarations.long_int\",exp=3D\"long_int\",numchild=3D\"0\",typ= e=3D\"long int\"\},child=3D\{name=3D\"struct_declarations.int_ptr_ptr\",exp= =3D\"int_ptr_ptr\",numchild=3D\"1\",type=3D\"int \\*\\*\"\},child=3D\{name= =3D\"struct_declarations.long_array\",exp=3D\"long_array\",numchild=3D\"12\= ",type=3D\"long int \\\[12\\\]\"\},child=3D\{name=3D\"struct_declarations.f= unc_ptr\",exp=3D\"func_ptr\",numchild=3D\"0\",type=3D\"void \\(\\*\\)\\((vo= id)?\\)\"\},child=3D\{name=3D\"struct_declarations.func_ptr_struct\",exp=3D= \"func_ptr_struct\",numchild=3D\"0\",type=3D\"struct _struct_decl \\(\\*\\)= \\((int, char \\*, long int)?\\)\"\},child=3D\{name=3D\"struct_declarations= .func_ptr_ptr\",exp=3D\"func_ptr_ptr\",numchild=3D\"0\",type=3D\"struct _st= ruct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=3D\{name= =3D\"struct_declarations.u1\",exp=3D\"u1\",numchild=3D\"4\",type=3D\"union = \{\\.\\.\\.\}\"\},child=3D\{name=3D\"struct_declarations.s2\",exp=3D\"s2\",= numchild=3D\"4\",type=3D\"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" =20 #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 stru =20 # Test: c_variable-4.5 # Desc: children of struct_declarations.integer -mi_gdb_test "-var-list-children struct_declarations.integer" \ - "\\^done,numchild=3D\"0\"" \ - "get children of struct_declarations.integer" +mi_list_varobj_children "struct_declarations.integer" {} \ + "get children of struct_declarations.integer" =20 # Test: c_variable-4.6 # Desc: number of children of struct_declarations.integer @@ -90,8 +100,7 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.7 # Desc: children of struct_declarations.character -mi_gdb_test "-var-list-children struct_declarations.character" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.character" {} \ "get children of struct_declarations.character" =20 # Test: c_variable-4.8 @@ -102,9 +111,9 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.9 # Desc: children of struct_declarations.char_ptr -mi_gdb_test "-var-list-children struct_declarations.char_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.char_ptr.\\*char_ptr\",exp=3D\"\\*char_ptr\",numchild=3D\"0\",type= =3D\"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" =20 # 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 stru =20 # Test: c_variable-4.11 # Desc: children of struct_declarations.long_int -mi_gdb_test "-var-list-children struct_declarations.long_int" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.long_int" {} \ "get children of struct_declarations.long_int" =20 # Test: c_variable-4.12 @@ -126,9 +134,9 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.13 # Desc: children of int_ptr_ptr -mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.int_ptr_ptr.\\*int_ptr_ptr\",exp=3D\"\\*int_ptr_ptr\",numchild=3D\"1= \",type=3D\"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 {in= t \*}} +} "get children of struct_declarations.int_ptr_ptr" =20 #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 stru =20 # Test: c_variable-4.15 # Desc: children of struct_declarations.long_array -mi_gdb_test "-var-list-children struct_declarations.long_array" \ - "\\^done,numchild=3D\"12\",children=3D\\\[child=3D\{name=3D\"struct_decla= rations.long_array.0\",exp=3D\"0\",numchild=3D\"0\",type=3D\"long int\"\},c= hild=3D\{name=3D\"struct_declarations.long_array.1\",exp=3D\"1\",numchild= =3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declarations.long_= array.2\",exp=3D\"2\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name= =3D\"struct_declarations.long_array.3\",exp=3D\"3\",numchild=3D\"0\",type= =3D\"long int\"\},child=3D\{name=3D\"struct_declarations.long_array.4\",exp= =3D\"4\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_d= eclarations.long_array.5\",exp=3D\"5\",numchild=3D\"0\",type=3D\"long int\"= \},child=3D\{name=3D\"struct_declarations.long_array.6\",exp=3D\"6\",numchi= ld=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declarations.lon= g_array.7\",exp=3D\"7\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{na= me=3D\"struct_declarations.long_array.8\",exp=3D\"8\",numchild=3D\"0\",type= =3D\"long int\"\},child=3D\{name=3D\"struct_declarations.long_array.9\",exp= =3D\"9\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_d= eclarations.long_array.10\",exp=3D\"10\",numchild=3D\"0\",type=3D\"long int= \"\},child=3D\{name=3D\"struct_declarations.long_array.11\",exp=3D\"11\",nu= mchild=3D\"0\",type=3D\"long int\"\}\\\]" \ - "get children of struct_declarations.long_array" +mi_list_array_varobj_children "struct_declarations.long_array" 12 "long in= t" \ + "get children of struct_declarations.long_array" =20 # 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 stru =20 # Test: c_variable-4.17 # Desc: children of struct_declarations.func_ptr -mi_gdb_test "-var-list-children struct_declarations.func_ptr" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.func_ptr" {} \ "get children of struct_declarations.func_ptr" =20 - # 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 stru =20 # 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=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.func_ptr_struct" {} \ "get children of struct_declarations.func_ptr_struct" =20 # Test: c_variable-4.20 @@ -182,22 +186,23 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.func_ptr_ptr" {} \ "get children of struct_declarations.func_ptr_ptr" =20 # 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=3D\"0\"" \ - "get number of children of struct_declarations.func_ptr_ptr" - + "\\^done,numchild=3D\"0\"" \ + "get number of children of struct_declarations.func_ptr_ptr" =20 # Test: c_variable-4.23 # Desc: children of struct_declarations.u1 -mi_gdb_test "-var-list-children struct_declarations.u1" \ - "\\^done,numchild=3D\"4\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.u1.a\",exp=3D\"a\",numchild=3D\"0\",type=3D\"int\"\},child=3D\{name= =3D\"struct_declarations.u1.b\",exp=3D\"b\",numchild=3D\"1\",type=3D\"char = \\*\"\},child=3D\{name=3D\"struct_declarations.u1.c\",exp=3D\"c\",numchild= =3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declarations.u1.d\= ",exp=3D\"d\",numchild=3D\"0\",type=3D\"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" =20 # Test: c_variable-4.24 # Desc: number of children of struct_declarations.u1 @@ -207,9 +212,13 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.25 # Desc: children of struct_declarations.s2 -mi_gdb_test "-var-list-children struct_declarations.s2" \ - "\\^done,numchild=3D\"4\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.s2.u2\",exp=3D\"u2\",numchild=3D\"3\",type=3D\"union \{\\.\\.\\.\}\"= \},child=3D\{name=3D\"struct_declarations.s2.g\",exp=3D\"g\",numchild=3D\"0= \",type=3D\"int\"\},child=3D\{name=3D\"struct_declarations.s2.h\",exp=3D\"h= \",numchild=3D\"0\",type=3D\"char\"\},child=3D\{name=3D\"struct_declaration= s.s2.i\",exp=3D\"i\",numchild=3D\"10\",type=3D\"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 stru "get number of children of struct_declarations.s2" =20 =20 -# 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=3D\"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=3D\"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=3D\"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=3D\"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=3D\"0\"" \ - "get children of struct_declarations.long_array.3" - -# 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" \ - "\\^done,numchild=3D\"0\"" \ - "get number of children of struct_declarations.long_array.3" - -# Test: c_variable-4.33=20 -# Desc: children of struct_declarations.long_array.4 -mi_gdb_test "-var-list-children struct_declarations.long_array.4" \ - "\\^done,numchild=3D\"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=3D\"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=3D\"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=3D\"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=3D\"0\"" \ - "get children of struct_declarations.long_array.6" +for {set i 1} {$i <=3D 9} {incr i} { + mi_list_varobj_children "struct_declarations.long_array.$i" {} \ + "get children of struct_declarations.long_array.$i" =20 -# 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" \ + mi_gdb_test "-var-info-num-children struct_declarations.long_array.$i"= \ "\\^done,numchild=3D\"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=3D\"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=3D\"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=3D\"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=3D\"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=3D\"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=3D\"0\"" \ - "get number of children of struct_declarations.long_array.9" + "get number of children of struct_declarations.long_array.$i" +} =20 # Test: c_variable-4.45 # Desc: children of struct_declarations.u1.a -mi_gdb_test "-var-list-children struct_declarations.u1.a" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.u1.a" {} \ "get children of struct_declarations.u1.a" =20 # Test: c_variable-4.46 @@ -344,9 +252,9 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.47 # Desc: children of struct_declarations.u1.b -mi_gdb_test "-var-list-children struct_declarations.u1.b" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.u1.b.\\*b\",exp=3D\"\\*b\",numchild=3D\"0\",type=3D\"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" =20 # 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 stru =20 # Test: c_variable-4.49 # Desc: children of struct_declarations.u1.c -mi_gdb_test "-var-list-children struct_declarations.u1.c" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.u1.c" {} \ "get children of struct_declarations.u1.c" =20 # Test: c_variable-4.50 @@ -368,8 +275,7 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.51 # Desc: children of struct_declarations.u1.d -mi_gdb_test "-var-list-children struct_declarations.u1.d" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.u1.d" {} \ "get children of struct_declarations.u1.d" =20 =20 @@ -382,9 +288,11 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.53 # Desc: children of struct_declarations.s2.u2 -mi_gdb_test "-var-list-children struct_declarations.s2.u2" \ - "\\^done,numchild=3D\"3\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.s2.u2.u1s1\",exp=3D\"u1s1\",numchild=3D\"4\",type=3D\"struct \{\\.\\= .\\.\}\"\},child=3D\{name=3D\"struct_declarations.s2.u2.f\",exp=3D\"f\",num= child=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declarations.= s2.u2.u1s2\",exp=3D\"u1s2\",numchild=3D\"2\",type=3D\"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" =20 # 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 stru =20 # Test: c_variable-4.55 # Desc: children of struct_declarations.s2.g -mi_gdb_test "-var-list-children struct_declarations.s2.g" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children struct_declarations.s2.g {} \ "get children of struct_declarations.s2.g" =20 # Test: c_variable-4.56 @@ -407,8 +314,7 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.57 # Desc: children of struct_declarations.s2.h -mi_gdb_test "-var-list-children struct_declarations.s2.h" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children struct_declarations.s2.h {} \ "get children of struct_declarations.s2.h" =20 # Test: c_variable-4.58 @@ -420,8 +326,11 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.59 # Desc: children of struct_declarations.s2.i -mi_gdb_test "-var-list-children struct_declarations.s2.i" \ - "\\^done,numchild=3D\"10\",children=3D\\\[child=3D\{name=3D\"struct_decla= rations.s2.i.0\",exp=3D\"0\",numchild=3D\"0\",type=3D\"long int\"\},child= =3D\{name=3D\"struct_declarations.s2.i.1\",exp=3D\"1\",numchild=3D\"0\",typ= e=3D\"long int\"\},child=3D\{name=3D\"struct_declarations.s2.i.2\",exp=3D\"= 2\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declar= ations.s2.i.3\",exp=3D\"3\",numchild=3D\"0\",type=3D\"long int\"\},child=3D= \{name=3D\"struct_declarations.s2.i.4\",exp=3D\"4\",numchild=3D\"0\",type= =3D\"long int\"\},child=3D\{name=3D\"struct_declarations.s2.i.5\",exp=3D\"5= \",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declara= tions.s2.i.6\",exp=3D\"6\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\= {name=3D\"struct_declarations.s2.i.7\",exp=3D\"7\",numchild=3D\"0\",type=3D= \"long int\"\},child=3D\{name=3D\"struct_declarations.s2.i.8\",exp=3D\"8\",= numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declaratio= ns.s2.i.9\",exp=3D\"9\",numchild=3D\"0\",type=3D\"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" =20 # Test: c_variable-4.60 @@ -432,9 +341,12 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"4\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.s2.u2.u1s1.d\",exp=3D\"d\",numchild=3D\"0\",type=3D\"int\"\},child= =3D\{name=3D\"struct_declarations.s2.u2.u1s1.e\",exp=3D\"e\",numchild=3D\"1= 0\",type=3D\"char \\\[10\\\]\"\},child=3D\{name=3D\"struct_declarations.s2.= u2.u1s1.func\",exp=3D\"func\",numchild=3D\"0\",type=3D\"int \\*\\(\\*\\)\\(= (void)?\\)\"\},child=3D\{name=3D\"struct_declarations.s2.u2.u1s1.foo\",exp= =3D\"foo\",numchild=3D\"0\",type=3D\"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" =20 # 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 stru =20 # 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=3D\"0\"" \ +mi_list_varobj_children struct_declarations.s2.u2.f {} \ "get children of struct_declarations.s2.u2.f" =20 # Test: c_variable-4.64 @@ -456,9 +367,10 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"2\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.s2.u2.u1s2.array_ptr\",exp=3D\"array_ptr\",numchild=3D\"2\",type=3D\= "char \\\[2\\\]\"\},child=3D\{name=3D\"struct_declarations.s2.u2.u1s2.func\= ",exp=3D\"func\",numchild=3D\"0\",type=3D\"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" =20 # 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 stru =20 # 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=3D\"0\"" \ +mi_list_varobj_children struct_declarations.s2.u2.u1s1.d {} \ "get children of struct_declarations.s2.u2.u1s1.d" =20 # Test: c_variable-4.68 @@ -480,8 +391,11 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"10\",children=3D\\\[child=3D\{name=3D\"struct_decla= rations.s2.u2.u1s1.e.0\",exp=3D\"0\",numchild=3D\"0\",type=3D\"char\"\},chi= ld=3D\{name=3D\"struct_declarations.s2.u2.u1s1.e.1\",exp=3D\"1\",numchild= =3D\"0\",type=3D\"char\"\},child=3D\{name=3D\"struct_declarations.s2.u2.u1s= 1.e.2\",exp=3D\"2\",numchild=3D\"0\",type=3D\"char\"\},child=3D{name=3D\"st= ruct_declarations.s2.u2.u1s1.e.3\",exp=3D\"3\",numchild=3D\"0\",type=3D\"ch= ar\"\},child=3D\{name=3D\"struct_declarations.s2.u2.u1s1.e.4\",exp=3D\"4\",= numchild=3D\"0\",type=3D\"char\"\},child=3D\{name=3D\"struct_declarations.s= 2.u2.u1s1.e.5\",exp=3D\"5\",numchild=3D\"0\",type=3D\"char\"\},child=3D\{na= me=3D\"struct_declarations.s2.u2.u1s1.e.6\",exp=3D\"6\",numchild=3D\"0\",ty= pe=3D\"char\"\},child=3D\{name=3D\"struct_declarations.s2.u2.u1s1.e.7\",exp= =3D\"7\",numchild=3D\"0\",type=3D\"char\"\},child=3D\{name=3D\"struct_decla= rations.s2.u2.u1s1.e.8\",exp=3D\"8\",numchild=3D\"0\",type=3D\"char\"\},chi= ld=3D\{name=3D\"struct_declarations.s2.u2.u1s1.e.9\",exp=3D\"9\",numchild= =3D\"0\",type=3D\"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" =20 # Test: c_variable-4.70 @@ -493,8 +407,7 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"0\"" \ +mi_list_varobj_children struct_declarations.s2.u2.u1s1.func {} \ "get children of struct_declarations.s2.u2.u1s1.func" =20 # Test: c_variable-4.72 @@ -506,8 +419,7 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"0\"" \ +mi_list_varobj_children struct_declarations.s2.u2.u1s1.foo {} \ "get children of struct_declarations.s2.u2.u1s1.foo" =20 # Test: c_variable-4.74 @@ -519,9 +431,10 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"2\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.s2.u2.u1s2.array_ptr.0\",exp=3D\"0\",numchild=3D\"0\",type=3D\"char\= "\},child=3D{name=3D\"struct_declarations.s2.u2.u1s2.array_ptr.1\",exp=3D\"= 1\",numchild=3D\"0\",type=3D\"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" =20 # 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 stru =20 # 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=3D\"0\"" \ +mi_list_varobj_children struct_declarations.s2.u2.u1s2.func {} \ "get children of struct_declarations.s2.u2.u1s2.func" =20 # Test: c_variable-4.78 @@ -543,10 +455,10 @@ mi_gdb_test "-var-info-num-children stru =20 # 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_p= tr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=3D\"\\*\\*int_ptr= _ptr\",numchild=3D\"0\",type=3D\"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" =20 # 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 {} ".*${src =20 # Test: c_variable-4.81 # Desc: create local variable "weird" -mi_gdb_test "-var-create weird * weird" \ - "\\^done,name=3D\"weird\",numchild=3D\"11\",value=3D\"$hex\",type=3D\"wei= rd_struct \\*\"" \ - "create local variable weird" +mi_create_varobj weird weird "create local variable weird" =20 # Test: c_variable-4.82 # Desc: children of weird -mi_gdb_test "-var-list-children weird" \ - "\\^done,numchild=3D\"11\",children=3D\\\[child=3D\{name=3D\"weird.intege= r\",exp=3D\"integer\",numchild=3D\"0\",type=3D\"int\"\},child=3D\{name=3D\"= weird.character\",exp=3D\"character\",numchild=3D\"0\",type=3D\"char\"\},ch= ild=3D\{name=3D\"weird.char_ptr\",exp=3D\"char_ptr\",numchild=3D\"1\",type= =3D\"char \\*\"\},child=3D\{name=3D\"weird.long_int\",exp=3D\"long_int\",nu= mchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"weird.int_ptr_ptr\"= ,exp=3D\"int_ptr_ptr\",numchild=3D\"1\",type=3D\"int \\*\\*\"\},child=3D\{n= ame=3D\"weird.long_array\",exp=3D\"long_array\",numchild=3D\"12\",type=3D\"= long int \\\[12\\\]\"\},child=3D\{name=3D\"weird.func_ptr\",exp=3D\"func_pt= r\",numchild=3D\"0\",type=3D\"void \\(\\*\\)\\((void)?\\)\"\},child=3D\{nam= e=3D\"weird.func_ptr_struct\",exp=3D\"func_ptr_struct\",numchild=3D\"0\",ty= pe=3D\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},ch= ild=3D\{name=3D\"weird.func_ptr_ptr\",exp=3D\"func_ptr_ptr\",numchild=3D\"0= \",type=3D\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\= )\"\},child=3D\{name=3D\"weird.u1\",exp=3D\"u1\",numchild=3D\"4\",type=3D\"= union \{\\.\\.\\.\}\"\},child=3D\{name=3D\"weird.s2\",exp=3D\"s2\",numchild= =3D\"4\",type=3D\"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" =20 # Test: c_variable-4.83 # Desc: number of children of weird @@ -581,8 +503,7 @@ mi_gdb_test "-var-info-num-children weir =20 # Test: c_variable-4.84 # Desc: children of weird->long_array -mi_gdb_test "-var-list-children weird.long_array" \ - "\\^done,numchild=3D\"12\",children=3D\\\[child=3D\{name=3D\"weird.long_a= rray.0\",exp=3D\"0\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name= =3D\"weird.long_array.1\",exp=3D\"1\",numchild=3D\"0\",type=3D\"long int\"\= },child=3D\{name=3D\"weird.long_array.2\",exp=3D\"2\",numchild=3D\"0\",type= =3D\"long int\"\},child=3D\{name=3D\"weird.long_array.3\",exp=3D\"3\",numch= ild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"weird.long_array.4\",e= xp=3D\"4\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"weird.= long_array.5\",exp=3D\"5\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\= {name=3D\"weird.long_array.6\",exp=3D\"6\",numchild=3D\"0\",type=3D\"long i= nt\"\},child=3D\{name=3D\"weird.long_array.7\",exp=3D\"7\",numchild=3D\"0\"= ,type=3D\"long int\"\},child=3D\{name=3D\"weird.long_array.8\",exp=3D\"8\",= numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"weird.long_array.= 9\",exp=3D\"9\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"w= eird.long_array.10\",exp=3D\"10\",numchild=3D\"0\",type=3D\"long int\"\},ch= ild=3D\{name=3D\"weird.long_array.11\",exp=3D\"11\",numchild=3D\"0\",type= =3D\"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 weir =20 # Test: c_variable-4.86 # Desc: children of weird.int_ptr_ptr -mi_gdb_test "-var-list-children weird.int_ptr_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"weird.int_ptr= _ptr.\\*int_ptr_ptr\",exp=3D\"\\*int_ptr_ptr\",numchild=3D\"1\",type=3D\"in= t \\*\"\}\\\]" \ - "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 weir =20 # 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=3D\"1\",children=3D\\\[child=3D\{name=3D\"weird.int_ptr= _ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=3D\"\\*\\*int_ptr_ptr\",numchil= d=3D\"0\",type=3D\"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 weir =20 # 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=3D\"weird->int_ptr_ptr\",numchild=3D\"1\",value=3D\"$hex\",= type=3D\"int \\*\\*\"" \ +mi_create_varobj "weird->int_ptr_ptr" "weird->int_ptr_ptr" \ "create local variable weird->int_ptr_ptr" =20 # Test: c_variable-4.91 # Desc: children of weird->int_ptr_ptr -mi_gdb_test "-var-list-children weird->int_ptr_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"weird->int_pt= r_ptr.\\*weird->int_ptr_ptr\",exp=3D\"\\*weird->int_ptr_ptr\",numchild=3D\"= 1\",type=3D\"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 {i= nt \*}} +} "get children of weird->int_ptr_ptr" =20 # 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 weir =20 # 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=3D\"1\",children=3D\\\[child=3D\{name=3D\"weird->int_pt= r_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",exp=3D\"\\*\\*weird-= >int_ptr_ptr\",numchild=3D\"0\",type=3D\"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" =20 # 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 weir =20 # 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.**w= eird->int_ptr_ptr" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children "weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->i= nt_ptr_ptr" {} \ "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_= ptr" =20 # 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=3D\"0\"" \ +mi_list_varobj_children "weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->i= nt_ptr_ptr" {} \ "get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird= ->int_ptr_ptr" =20 # Test: c_variable-4.97 @@ -865,13 +783,37 @@ mi_gdb_test "-var-update --all-values *" "\\^done,changelist=3D\\\[\{name=3D\"struct_declarations.long_array.11\",= value=3D\"5678\",in_scope=3D\"true\",type_changed=3D\"false\"\}\\\]" \ "update all vars struct_declarations.long_array.11 changed, print values." =20 -mi_gdb_test "-var-list-children --all-values struct_declarations.long_arra= y" \ - "\\^done,numchild=3D\"12\",children=3D\\\[child=3D\{name=3D\"struc= t_declarations.long_array.0\",exp=3D\"0\",numchild=3D\"0\",value=3D\"1234\"= ,type=3D\"long int\"\},child=3D\{name=3D\"struct_declarations.long_array.1\= ",exp=3D\"1\",numchild=3D\"0\",value=3D\"2345\",type=3D\"long int\"\},child= =3D\{name=3D\"struct_declarations.long_array.2\",exp=3D\"2\",numchild=3D\"0= \",value=3D\"3456\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declara= tions.long_array.3\",exp=3D\"3\",numchild=3D\"0\",value=3D\"4567\",type=3D\= "long int\"\},child=3D\{name=3D\"struct_declarations.long_array.4\",exp=3D\= "4\",numchild=3D\"0\",value=3D\"5678\",type=3D\"long int\"\},child=3D\{name= =3D\"struct_declarations.long_array.5\",exp=3D\"5\",numchild=3D\"0\",value= =3D\"6789\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declarations.lo= ng_array.6\",exp=3D\"6\",numchild=3D\"0\",value=3D\"7890\",type=3D\"long in= t\"\},child=3D\{name=3D\"struct_declarations.long_array.7\",exp=3D\"7\",num= child=3D\"0\",value=3D\"8901\",type=3D\"long int\"\},child=3D\{name=3D\"str= uct_declarations.long_array.8\",exp=3D\"8\",numchild=3D\"0\",value=3D\"9012= \",type=3D\"long int\"\},child=3D\{name=3D\"struct_declarations.long_array.= 9\",exp=3D\"9\",numchild=3D\"0\",value=3D\"1234\",type=3D\"long int\"\},chi= ld=3D\{name=3D\"struct_declarations.long_array.10\",exp=3D\"10\",numchild= =3D\"0\",value=3D\"3456\",type=3D\"long int\"\},child=3D\{name=3D\"struct_d= eclarations.long_array.11\",exp=3D\"11\",numchild=3D\"0\",value=3D\"5678\",= type=3D\"long int\"\}\\\]" \ - "listing of names and values of children" - -mi_gdb_test "-var-list-children --simple-values struct_declarations" \ - "\\^done,numchild=3D\"11\",children=3D\\\[child=3D\{name=3D\"struc= t_declarations.integer\",exp=3D\"integer\",numchild=3D\"0\",value=3D\"123\"= ,type=3D\"int\"\},child=3D\{name=3D\"struct_declarations.character\",exp=3D= \"character\",numchild=3D\"0\",value=3D\"0 '\\\\\\\\0'\",type=3D\"char\"\},= child=3D\{name=3D\"struct_declarations.char_ptr\",exp=3D\"char_ptr\",numchi= ld=3D\"1\",value=3D\"$hex \\\\\"hello\\\\\"\",type=3D\"char \\*\"\},child= =3D\{name=3D\"struct_declarations.long_int\",exp=3D\"long_int\",numchild=3D= \"0\",value=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declara= tions.int_ptr_ptr\",exp=3D\"int_ptr_ptr\",numchild=3D\"1\",value=3D\"$hex\"= ,type=3D\"int \\*\\*\"\},child=3D\{name=3D\"struct_declarations.long_array\= ",exp=3D\"long_array\",numchild=3D\"12\",type=3D\"long int \\\[12\\\]\"\},c= hild=3D\{name=3D\"struct_declarations.func_ptr\",exp=3D\"func_ptr\",numchil= d=3D\"0\",value=3D\"(@$hex: |)$hex \",type=3D\"void \\(\\*\\)\\(vo= id\\)\"\},child=3D\{name=3D\"struct_declarations.func_ptr_struct\",exp=3D\"= func_ptr_struct\",numchild=3D\"0\",value=3D\"0\",type=3D\"struct _struct_de= cl \\(\\*\\)\\(int, char \\*, long int\\)\"\},child=3D\{name=3D\"struct_dec= larations.func_ptr_ptr\",exp=3D\"func_ptr_ptr\",numchild=3D\"0\",value=3D\"= 0\",type=3D\"struct _struct_decl \\*\\(\\*\\)\\(int, char \\*, long int\\)\= "\},child=3D\{name=3D\"struct_declarations.u1\",exp=3D\"u1\",numchild=3D\"4= \",type=3D\"union \{...\}\"\},child=3D\{name=3D\"struct_declarations.s2\",e= xp=3D\"s2\",numchild=3D\"4\",type=3D\"struct \{...\}\"\}\\\]" \ - "listing of children, simple types: names, type and values, complex type= s: 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 "] \ + {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 type= s: names and types" =20 # Delete all variables mi_gdb_test "-var-delete struct_declarations" \ @@ -892,15 +834,14 @@ mi_execute_to "exec-step 43" "end-steppi =20 # Test: c_variable-5.10 # Desc: create psnp->char_ptr -mi_gdb_test "-var-create psnp->char_ptr * psnp->char_ptr" \ - "\\^done,name=3D\"psnp->char_ptr\",numchild=3D\"1\",value=3D\".*\",type= =3D\"char \\*\\*\\*\\*\"" \ +mi_create_varobj "psnp->char_ptr" "psnp->char_ptr" \ "create local variable psnp->char_ptr" =20 # Test: c_variable-5.11 # Desc: children of psnp->char_ptr -mi_gdb_test "-var-list-children psnp->char_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->char_pt= r.\\*psnp->char_ptr\",exp=3D\"\\*psnp->char_ptr\",numchild=3D\"1\",type=3D\= "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" =20 # 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 =20 # 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=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->char_pt= r.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",exp=3D\"\\*\\*psnp->char_ptr\",n= umchild=3D\"1\",type=3D\"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" =20 # 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 =20 # Test: c_variable-5.15 # Desc: children of *(*(psnp->char_ptr)) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->cha= r_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->char_pt= r.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",exp=3D\"= \\*\\*\\*psnp->char_ptr\",numchild=3D\"1\",type=3D\"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" =20 # Test: c_variable-5.15B # Desc: children of *(*(*(psnp->char_ptr))) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->cha= r_ptr.***psnp->char_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->char_pt= r.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\= \*psnp->char_ptr\",exp=3D\"\\*\\*\\*\\*psnp->char_ptr\",numchild=3D\"0\",ty= pe=3D\"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" =20 # 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 =20 # Test: c_variable-5.17 # Desc: children of *(*(*(psnp->char_ptr))) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->cha= r_ptr.***psnp->char_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->char_pt= r.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\= \*psnp->char_ptr\",exp=3D\"\\*\\*\\*\\*psnp->char_ptr\",numchild=3D\"0\",ty= pe=3D\"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" =20 # 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 =20 # Test: c_variable-5.17B # Desc: children of *(*(*(*(psnp->char_ptr)))) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->cha= r_ptr.***psnp->char_ptr.****psnp->char_ptr" \ - "\\^done,numchild=3D\"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" =20 # Test: c_variable-5.18B @@ -962,18 +906,16 @@ mi_gdb_test "-var-info-num-children psnp "\\^done,numchild=3D\"0\"" \ "get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_pt= r.***psnp->char_ptr.****psnp->char_ptr" =20 - # Test: c_variable-5.19 # Desc: create psnp->long_ptr -mi_gdb_test "-var-create psnp->long_ptr * psnp->long_ptr" \ - "\\^done,name=3D\"psnp->long_ptr\",numchild=3D\"1\",value=3D\"$hex\",type= =3D\"long int \\*\\*\\*\\*\"" \ +mi_create_varobj "psnp->long_ptr" "psnp->long_ptr" \ "create local variable psnp->long_ptr" =20 # Test: c_variable-5.20 # Desc: children of psnp->long_ptr -mi_gdb_test "-var-list-children psnp->long_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->long_pt= r.\\*psnp->long_ptr\",exp=3D\"\\*psnp->long_ptr\",numchild=3D\"1\",type=3D\= "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" =20 # 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 =20 # 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=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->long_pt= r.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",exp=3D\"\\*\\*psnp->long_ptr\",n= umchild=3D\"1\",type=3D\"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" =20 =20 # Test: c_variable-5.23 @@ -996,9 +938,10 @@ mi_gdb_test "-var-info-num-children psnp =20 # Test: c_variable-5.24 # Desc: children of *(*(psnp->long_ptr)) -mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->lon= g_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->long_pt= r.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",exp=3D\"= \\*\\*\\*psnp->long_ptr\",numchild=3D\"1\",type=3D\"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" =20 # 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 =20 # Test: c_variable-5.26 # Desc: children of *(*(*(psnp->long_ptr))) -mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->lon= g_ptr.***psnp->long_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->long_pt= r.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\= \*psnp->long_ptr\",exp=3D\"\\*\\*\\*\\*psnp->long_ptr\",numchild=3D\"0\",ty= pe=3D\"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" =20 # 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 =20 # Test: c_variable-5.28 # Desc: children of *(*(*(*(psnp->long_ptr)))) -mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->lon= g_ptr.***psnp->long_ptr.****psnp->long_ptr" \ - "\\^done,numchild=3D\"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" =20 # Test: c_variable-5.29 @@ -1032,15 +975,16 @@ mi_gdb_test "-var-info-num-children psnp =20 # Test: c_variable-5.30 # Desc: create psnp->ptrs -mi_gdb_test "-var-create psnp->ptrs * psnp->ptrs" \ - "\\^done,name=3D\"psnp->ptrs\",numchild=3D\"3\",value=3D\"\\\[3\\\]\",= type=3D\"struct _struct_n_pointer \\*\\\[3\\\]\"" \ +mi_create_varobj "psnp->ptrs" "psnp->ptrs" \ "create local variable psnp->ptrs" =20 # Test: c_variable-5.31 # Desc: children of psnp->ptrs -mi_gdb_test "-var-list-children psnp->ptrs" \ - "\\^done,numchild=3D\"3\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0\= ",exp=3D\"0\",numchild=3D\"4\",type=3D\"struct _struct_n_pointer \\*\"\},ch= ild=3D\{name=3D\"psnp->ptrs.1\",exp=3D\"1\",numchild=3D\"4\",type=3D\"struc= t _struct_n_pointer \\*\"\},child=3D\{name=3D\"psnp->ptrs.2\",exp=3D\"2\",n= umchild=3D\"4\",type=3D\"struct _struct_n_pointer \\*\"\}\\\]" \ - "get children of psnp->ptrs" +mi_list_varobj_children "psnp->ptrs" {=20=20=20=20 + {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" =20 # Test: c_variable-5.32 # Desc: number of children of psnp->ptrs @@ -1050,9 +994,12 @@ mi_gdb_test "-var-info-num-children psnp =20 # Test: c_variable-5.33 # Desc: children of psnp->ptrs[0] -mi_gdb_test "-var-list-children psnp->ptrs.0" \ - "\\^done,numchild=3D\"4\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= char_ptr\",exp=3D\"char_ptr\",numchild=3D\"1\",type=3D\"char \\*\\*\\*\\*\"= \},child=3D\{name=3D\"psnp->ptrs.0.long_ptr\",exp=3D\"long_ptr\",numchild= =3D\"1\",type=3D\"long int \\*\\*\\*\\*\"\},child=3D\{name=3D\"psnp->ptrs.0= .ptrs\",exp=3D\"ptrs\",numchild=3D\"3\",type=3D\"struct _struct_n_pointer \= \*\\\[3\\\]\"\},child=3D\{name=3D\"psnp->ptrs.0.next\",exp=3D\"next\",numch= ild=3D\"4\",type=3D\"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" =20 # 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 =20 # Test: c_variable-5.35 # Desc: children of psnp->ptrs[0]->next -mi_gdb_test "-var-list-children psnp->ptrs.0.next" \ - "\\^done,numchild=3D\"4\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.char_ptr\",exp=3D\"char_ptr\",numchild=3D\"1\",type=3D\"char \\*\\*\\*= \\*\"\},child=3D\{name=3D\"psnp->ptrs.0.next.long_ptr\",exp=3D\"long_ptr\",= numchild=3D\"1\",type=3D\"long int \\*\\*\\*\\*\"\},child=3D\{name=3D\"psnp= ->ptrs.0.next.ptrs\",exp=3D\"ptrs\",numchild=3D\"3\",type=3D\"struct _struc= t_n_pointer \\*\\\[3\\\]\"\},child=3D\{name=3D\"psnp->ptrs.0.next.next\",ex= p=3D\"next\",numchild=3D\"4\",type=3D\"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" =20 #} {char_ptr long_ptr ptrs next} =20 @@ -1077,9 +1027,9 @@ mi_gdb_test "-var-info-num-children psnp =20 # 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=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.char_ptr.\\*char_ptr\",exp=3D\"\\*char_ptr\",numchild=3D\"1\",type=3D\= "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" =20 #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 =20 # 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=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",exp=3D\"\\*\\*char_ptr\",numchil= d=3D\"1\",type=3D\"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" =20 # 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 =20 # 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.**cha= r_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",exp=3D\"\\*\\*= \\*char_ptr\",numchild=3D\"1\",type=3D\"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" =20 # 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.**cha= r_ptr.***char_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char= _ptr\",exp=3D\"\\*\\*\\*\\*char_ptr\",numchild=3D\"0\",type=3D\"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" =20 # 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 =20 # 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.**cha= r_ptr.***char_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char= _ptr\",exp=3D\"\\*\\*\\*\\*char_ptr\",numchild=3D\"0\",type=3D\"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" =20 # 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 =20 # 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.**cha= r_ptr.***char_ptr.****char_ptr" \ - "\\^done,numchild=3D\"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" =20 # Test: c_variable-5.44B @@ -1147,15 +1099,20 @@ mi_gdb_test "-var-info-num-children psnp =20 # 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=3D\"4\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.next.char_ptr\",exp=3D\"char_ptr\",numchild=3D\"1\",type=3D\"char \\*\= \*\\*\\*\"\},child=3D\{name=3D\"psnp->ptrs.0.next.next.long_ptr\",exp=3D\"l= ong_ptr\",numchild=3D\"1\",type=3D\"long int \\*\\*\\*\\*\"\},child=3D\{nam= e=3D\"psnp->ptrs.0.next.next.ptrs\",exp=3D\"ptrs\",numchild=3D\"3\",type=3D= \"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=3D\{name=3D\"psnp->ptrs.0= .next.next.next\",exp=3D\"next\",numchild=3D\"4\",type=3D\"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" =20 # 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=3D\"3\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.next.ptrs.0\",exp=3D\"0\",numchild=3D\"4\",type=3D\"struct _struct_n_p= ointer \\*\"\},child=3D\{name=3D\"psnp->ptrs.0.next.next.ptrs.1\",exp=3D\"1= \",numchild=3D\"4\",type=3D\"struct _struct_n_pointer \\*\"\},child=3D\{nam= e=3D\"psnp->ptrs.0.next.next.ptrs.2\",exp=3D\"2\",numchild=3D\"4\",type=3D\= "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" =20 # Step over "snp0.char_ptr =3D &b3;" mi_step_to do_children_tests {} ".*${srcfile}" \ Index: gdb.mi/mi-var-cmd.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-cmd.exp,v retrieving revision 1.34 diff -u -p -r1.34 mi-var-cmd.exp --- gdb.mi/mi-var-cmd.exp 1 Jan 2008 22:53:20 -0000 1.34 +++ gdb.mi/mi-var-cmd.exp 26 Mar 2008 13:14:42 -0000 @@ -50,9 +50,7 @@ mi_gdb_load ${binfile} # Test: c_variable-1.1 # Desc: Create global variable =20 -mi_gdb_test "111-var-create global_simple * global_simple" \ - "111\\^done,name=3D\"global_simple\",numchild=3D\"6\",value=3D\"{...}\",t= ype=3D\"simpleton\"" \ - "create global variable" +mi_create_varobj "global_simple" "global_simple" "create global variable" =20 # Test: c_variable-1.2 # Desc: Create non-existent variable @@ -78,75 +76,46 @@ mi_continue_to_line $line_dlt_first_real # Test: c_variable-1.4 # Desc: create local variables =20 -mi_gdb_test "-var-create linteger * linteger" \ - "\\^done,name=3D\"linteger\",numchild=3D\"0\",value=3D\".*\",type=3D\"int= \"" \ - "create local variable linteger" +mi_create_varobj_checked linteger linteger int "create local variable lint= eger" + +mi_create_varobj_checked lpinteger lpinteger {int \*} "create local variab= le lpinteger" + +mi_create_varobj_checked lcharacter lcharacter\[0\] char "create local var= iable lcharacter" + +mi_create_varobj_checked lpcharacter lpcharacter {char \*} "create local v= ariable lpcharacter" + +mi_create_varobj_checked llong llong "long int" "create local variable llo= ng" + +mi_create_varobj_checked lplong lplong {long int \*} "create local variabl= e lplong" + +mi_create_varobj_checked lfloat lfloat float "create local variable lfloat" =20 -mi_gdb_test "-var-create lpinteger * lpinteger" \ - "\\^done,name=3D\"lpinteger\",numchild=3D\"1\",value=3D\"$hex\",type=3D\"= int \\*\"" \ - "create local variable lpinteger" - -mi_gdb_test "-var-create lcharacter * lcharacter\[0\]" \ - "\\^done,name=3D\"lcharacter\",numchild=3D\"0\",value=3D\".*\",type=3D\"c= har\"" \ - "create local variable lcharacter " - -mi_gdb_test "-var-create lpcharacter * lpcharacter" \ - "\\^done,name=3D\"lpcharacter\",numchild=3D\"1\",value=3D\"$hex.*\",type= =3D\"char \\*\"" \ - "create local variable lpcharacter" - -mi_gdb_test "-var-create llong * llong" \ - "\\^done,name=3D\"llong\",numchild=3D\"0\",value=3D\".*\",type=3D\"long i= nt\"" \ - "create local variable llong" - -mi_gdb_test "-var-create lplong * lplong" \ - "\\^done,name=3D\"lplong\",numchild=3D\"1\",value=3D\"$hex\",type=3D\"lon= g int \\*\"" \ - "create local variable lplong" - -mi_gdb_test "-var-create lfloat * lfloat" \ - "\\^done,name=3D\"lfloat\",numchild=3D\"0\",value=3D\".*\",type=3D\"float= \"" \ - "create local variable lfloat" - -mi_gdb_test "-var-create lpfloat * lpfloat" \ - "\\^done,name=3D\"lpfloat\",numchild=3D\"1\",value=3D\"$hex\",type=3D\"fl= oat \\*\"" \ - "create local variable lpfloat" - -mi_gdb_test "-var-create ldouble * ldouble" \ - "\\^done,name=3D\"ldouble\",numchild=3D\"0\",value=3D\".*\",type=3D\"doub= le\"" \ - "create local variable ldouble" - -mi_gdb_test "-var-create lpdouble * lpdouble" \ - "\\^done,name=3D\"lpdouble\",numchild=3D\"1\",value=3D\"$hex\",type=3D\"d= ouble \\*\"" \ - "create local variable lpdouble" - -mi_gdb_test "-var-create lsimple * lsimple" \ - "\\^done,name=3D\"lsimple\",numchild=3D\"6\",value=3D\"{...}\",type=3D\"s= truct _simple_struct\"" \ - "create local variable lsimple" - -mi_gdb_test "-var-create lpsimple * lpsimple" \ - "\\^done,name=3D\"lpsimple\",numchild=3D\"6\",value=3D\"$hex\",type=3D\"s= truct _simple_struct \\*\"" \ - "create local variable lpsimple" - -mi_gdb_test "-var-create func * func" \ - "\\^done,name=3D\"func\",numchild=3D\"0\",value=3D\".*\",type=3D\"void \\= (\\*\\)\\((void|)\\)\"" \ - "create local variable func" +mi_create_varobj_checked lpfloat lpfloat {float \*} "create local variable= lpfloat" + +mi_create_varobj_checked ldouble ldouble double "create local variable ldo= uble" + +mi_create_varobj_checked lpdouble lpdouble {double \*} "create local varia= ble lpdouble" + +mi_create_varobj_checked lsimple lsimple "struct _simple_struct" "create l= ocal variable lsimple" + +mi_create_varobj_checked lpsimple lpsimple {struct _simple_struct \*} "cre= ate local variable lpsimple" + +mi_create_varobj_checked func func {void \(\*\)\((void|)\)} "create local = variable func" =20 # Test: c_variable-1.5 # Desc: create lsimple.character -mi_gdb_test "-var-create lsimple.character * lsimple.character" \ - "\\^done,name=3D\"lsimple.character\",numchild=3D\"0\",value=3D\".*\",typ= e=3D\"char\"" \ +mi_create_varobj_checked lsimple.character lsimple.character "char" \ "create lsimple.character" =20 # Test: c_variable-1.6 # Desc: create lpsimple->integer -mi_gdb_test "-var-create lsimple->integer * lsimple->integer" \ - "\\^done,name=3D\"lsimple->integer\",numchild=3D\"0\",value=3D\".*\",type= =3D\"int\"" \ +mi_create_varobj_checked lsimple->integer lsimple->integer "int" \ "create lsimple->integer" =20 # Test: c_variable-1.7 -# Desc: ceate lsimple.integer -mi_gdb_test "-var-create lsimple.integer * lsimple.integer" \ - "\\^done,name=3D\"lsimple.integer\",numchild=3D\"0\",value=3D\".*\",type= =3D\"int\"" \ - "create lsimple->integer" +# Desc: crate lsimple.integer +mi_create_varobj_checked lsimple.integer lsimple.integer "int" \ + "create lsimple.integer" =20 =20 # Test: c_variable-1.9 @@ -438,13 +407,9 @@ mi_continue_to subroutine1 =20 # Test: c_variable-2.10 # Desc: create variable for locals i,l in subroutine1 -mi_gdb_test "-var-create i * i" \ - "\\^done,name=3D\"i\",numchild=3D\"0\",value=3D\"4321\",type=3D\"int\"" \ - "create i" - -mi_gdb_test "-var-create l * l" \ - "\\^done,name=3D\"l\",numchild=3D\"1\",value=3D\"$hex\",type=3D\"long int= \\*\"" \ - "create l" +mi_create_varobj_checked i i int "create i" + +mi_create_varobj_checked l l {long int \*} "create l" =20 # Test: c_variable-2.11 # Desc: create do_locals_tests local in subroutine1 @@ -579,7 +544,7 @@ mi_gdb_test "-var-delete l" \ mi_continue_to do_special_tests =20 mi_gdb_test "-var-create selected_a @ a" \ - {\^done,name=3D"selected_a",numchild=3D"0",value=3D\".*\",type=3D"int"} \ + {\^done,name=3D"selected_a",numchild=3D"0",value=3D\".*\",type=3D"int".*= } \ "create selected_a" =20 mi_continue_to incr_a Index: gdb.mi/mi-var-display.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-display.exp,v retrieving revision 1.21 diff -u -p -r1.21 mi-var-display.exp --- gdb.mi/mi-var-display.exp 23 Jan 2008 06:20:57 -0000 1.21 +++ gdb.mi/mi-var-display.exp 26 Mar 2008 13:14:42 -0000 @@ -64,9 +64,7 @@ gdb_expect { =20 # Test: c_variable-6.1 # Desc: create variable bar -mi_gdb_test "-var-create bar * bar" \ - "\\^done,name=3D\"bar\",numchild=3D\"0\",value=3D\".*\",type=3D\"int\"" \ - "create local variable bar" +mi_create_varobj bar bar "create local variable bar" =20 # Test: c_variable-6.2 # Desc: type of variable bar @@ -118,9 +116,7 @@ mi_gdb_test "-var-delete bar" \ =20 # Test: c_variable-6.11 # Desc: create variable foo -mi_gdb_test "-var-create foo * foo" \ - "\\^done,name=3D\"foo\",numchild=3D\"1\",value=3D\".*\",type=3D\"int \\*\= "" \ - "create local variable foo" +mi_create_varobj foo foo "create local variable foo" =20 # Test: c_variable-6.12 # Desc: type of variable foo @@ -178,13 +174,23 @@ mi_gdb_test "-var-delete foo" \ =20 # Test: c_variable-6.21 # Desc: create variable weird and children -mi_gdb_test "-var-create weird * weird" \ - "\\^done,name=3D\"weird\",numchild=3D\"11\",value=3D\".*\",type=3D\"weird= _struct \\*\"" \ - "create local variable weird" - -mi_gdb_test "-var-list-children weird" \ - "\\^done,numchild=3D\"11\",children=3D\\\[child=3D\{name=3D\"weird.intege= r\",exp=3D\"integer\",numchild=3D\"0\",type=3D\"int\"\},child=3D\{name=3D\"= weird.character\",exp=3D\"character\",numchild=3D\"0\",type=3D\"char\"\},ch= ild=3D{name=3D\"weird.char_ptr\",exp=3D\"char_ptr\",numchild=3D\"1\",type= =3D\"char \\*\"\},child=3D\{name=3D\"weird.long_int\",exp=3D\"long_int\",nu= mchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"weird.int_ptr_ptr\"= ,exp=3D\"int_ptr_ptr\",numchild=3D\"1\",type=3D\"int \\*\\*\"\},child=3D\{n= ame=3D\"weird.long_array\",exp=3D\"long_array\",numchild=3D\"10\",type=3D\"= long int \\\[10\\\]\"\},child=3D\{name=3D\"weird.func_ptr\",exp=3D\"func_pt= r\",numchild=3D\"0\",type=3D\"void \\(\\*\\)\\((void|)\\)\"\},child=3D\{nam= e=3D\"weird.func_ptr_struct\",exp=3D\"func_ptr_struct\",numchild=3D\"0\",ty= pe=3D\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int|)\\)\"\},ch= ild=3D\{name=3D\"weird.func_ptr_ptr\",exp=3D\"func_ptr_ptr\",numchild=3D\"0= \",type=3D\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int|)\\= )\"\},child=3D\{name=3D\"weird.u1\",exp=3D\"u1\",numchild=3D\"4\",type=3D\"= union \{\\.\\.\\.\}\"\},child=3D\{name=3D\"weird.s2\",exp=3D\"s2\",numchild= =3D\"4\",type=3D\"struct \{\\.\\.\\.\}\"\}\\\]" \ - "get children local variable weird" +mi_create_varobj weird weird "create local variable 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 10 "long int \\[10\\]"} + {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 local variable weird" =20 =20 # Test: c_variable-6.23 @@ -343,9 +349,7 @@ gdb_expect { =20 # Test: c_variable-7.10 # Desc: create union u -mi_gdb_test "-var-create u * u" \ - "\\^done,name=3D\"u\",numchild=3D\"2\",value=3D\".*\",type=3D\"union name= d_union\"" \ - "create local variable u" +mi_create_varobj u u "create local variable u" =20 # Test: c_variable-7.11 # Desc: value of u @@ -373,15 +377,14 @@ mi_gdb_test "-var-info-num-children u" \ =20 # Test: c_variable-7.15 # Desc: children of u -mi_gdb_test "-var-list-children u" \ - "\\^done,numchild=3D\"2\",children=3D\\\[child=3D\{name=3D\"u.integer\",e= xp=3D\"integer\",numchild=3D\"0\",type=3D\"int\"\},child=3D\{name=3D\"u.cha= r_ptr\",exp=3D\"char_ptr\",numchild=3D\"1\",type=3D\"char \\*\"\}\\\]" \ - "get children of u" +mi_list_varobj_children u { + {u.integer integer 0 int} + {u.char_ptr char_ptr 1 {char \*}} +} "get children of u" =20 # Test: c_variable-7.20 # Desc: create anonu -mi_gdb_test "-var-create anonu * anonu" \ - "\\^done,name=3D\"anonu\",numchild=3D\"3\",value=3D\".*\",type=3D\"union = \{\\.\\.\\.\}\"" \ - "create local variable anonu" +mi_create_varobj anonu anonu "create local variable anonu" =20 # Test: c_variable-7.21 # Desc: value of anonu @@ -409,15 +412,15 @@ mi_gdb_test "-var-info-num-children anon =20 # Test: c_variable-7.25 # Desc: children of anonu -mi_gdb_test "-var-list-children anonu" \ - "\\^done,numchild=3D\"3\",children=3D\\\[child=3D\{name=3D\"anonu.a\",exp= =3D\"a\",numchild=3D\"0\",type=3D\"int\"\},child=3D\{name=3D\"anonu.b\",exp= =3D\"b\",numchild=3D\"0\",type=3D\"char\"\},child=3D\{name=3D\"anonu.c\",ex= p=3D\"c\",numchild=3D\"0\",type=3D\"long int\"\}\\\]" \ - "get children of anonu" +mi_list_varobj_children "anonu" { + {anonu.a a 0 int} + {anonu.b b 0 char} + {anonu.c c 0 "long int"} +} "get children of anonu" =20 # Test: c_variable-7.30 # Desc: create struct s -mi_gdb_test "-var-create s * s" \ - "\\^done,name=3D\"s\",numchild=3D\"6\",value=3D\".*\",type=3D\"struct _si= mple_struct\"" \ - "create local variable s" +mi_create_varobj s s "create local variable s" =20 =20 # Test: c_variable-7.31 @@ -446,16 +449,19 @@ mi_gdb_test "-var-info-num-children s" \ =20 # Test: c_variable-7.35 # Desc: children of s -mi_gdb_test "-var-list-children s" \ - "\\^done,numchild=3D\"6\",children=3D\\\[child=3D\{name=3D\"s.integer\",e= xp=3D\"integer\",numchild=3D\"0\",type=3D\"int\"\},child=3D\{name=3D\"s.uns= igned_integer\",exp=3D\"unsigned_integer\",numchild=3D\"0\",type=3D\"unsign= ed int\"\},child=3D\{name=3D\"s.character\",exp=3D\"character\",numchild=3D= \"0\",type=3D\"char\"\},child=3D\{name=3D\"s.signed_character\",exp=3D\"sig= ned_character\",numchild=3D\"0\",type=3D\"signed char\"\},child=3D\{name=3D= \"s.char_ptr\",exp=3D\"char_ptr\",numchild=3D\"1\",type=3D\"char \\*\"\},ch= ild=3D\{name=3D\"s.array_of_10\",exp=3D\"array_of_10\",numchild=3D\"10\",ty= pe=3D\"int \\\[10\\\]\"\}\\\]" \ - "get children of s" +mi_list_varobj_children s { + {s.integer integer 0 int} + {s.unsigned_integer unsigned_integer 0 "unsigned int"} + {s.character character 0 char} + {s.signed_character signed_character 0 "signed char"} + {s.char_ptr char_ptr 1 {char \*}} + {s.array_of_10 array_of_10 10 {int \[10\]}} +} "get children of s" #} {integer unsigned_integer character signed_character char_ptr array_of_= 10} =20 # Test: c_variable-7.40 # Desc: create anons -mi_gdb_test "-var-create anons * anons" \ - "\\^done,name=3D\"anons\",numchild=3D\"3\",value=3D\".*\",type=3D\"struct= \{\\.\\.\\.\}\"" \ - "create local variable anons" +mi_create_varobj anons anons "create local variable anons" =20 # Test: c_variable-7.41 # Desc: value of anons @@ -483,16 +489,15 @@ mi_gdb_test "-var-info-num-children anon =20 # Test: c_variable-7.45 # Desc: children of anons -mi_gdb_test "-var-list-children anons" \ - "\\^done,numchild=3D\"3\",children=3D\\\[child=3D\{name=3D\"anons.a\",exp= =3D\"a\",numchild=3D\"0\",type=3D\"int\"\},child=3D\{name=3D\"anons.b\",exp= =3D\"b\",numchild=3D\"0\",type=3D\"char\"\},child=3D\{name=3D\"anons.c\",ex= p=3D\"c\",numchild=3D\"0\",type=3D\"long int\"\}\\\]" \ - "get children of anons" - +mi_list_varobj_children anons { + {anons.a a 0 int} + {anons.b b 0 char} + {anons.c c 0 "long int"} +} "get children of anons" =20 # Test: c_variable-7.50 # Desc: create enum e -mi_gdb_test "-var-create e * e" \ - "\\^done,name=3D\"e\",numchild=3D\"0\",value=3D\".*\",type=3D\"enum foo\"= " \ - "create local variable e" +mi_create_varobj e e "create local variable e" =20 setup_xfail "*-*-*" # Test: c_variable-7.51 @@ -528,9 +533,7 @@ mi_gdb_test "-var-list-children e" \ =20 # Test: c_variable-7.60 # Desc: create anone -mi_gdb_test "-var-create anone * anone" \ - "\\^done,name=3D\"anone\",numchild=3D\"0\",value=3D\".*\",type=3D\"enum \= {\\.\\.\\.\}\"" \ - "create local variable anone" +mi_create_varobj anone anone "create local variable anone" =20 setup_xfail "*-*-*" # Test: c_variable-7.61 @@ -610,11 +613,11 @@ gdb_expect { # Test: c_variable-7.81 # Desc: Create variables in different scopes mi_gdb_test "-var-create a1 * a" \ - "\\^done,name=3D\"a1\",numchild=3D\"0\",value=3D\".*\",type=3D\"char\"" \ + "\\^done,name=3D\"a1\",numchild=3D\"0\",value=3D\".*\",type=3D\"char\".*"= \ "create local variable a1" =20 mi_gdb_test "-var-create a2 $fp a" \ - "\\^done,name=3D\"a2\",numchild=3D\"0\",value=3D\".*\",type=3D\"int\"" \ + "\\^done,name=3D\"a2\",numchild=3D\"0\",value=3D\".*\",type=3D\"int\".*" \ "create variable a2 in different scope" =20 #gdbtk_test c_variable-7.81 {create variables in different scopes} { Index: gdb.mi/mi-var-invalidate.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-invalidate.exp,v retrieving revision 1.3 diff -u -p -r1.3 mi-var-invalidate.exp --- gdb.mi/mi-var-invalidate.exp 1 Jan 2008 22:53:20 -0000 1.3 +++ gdb.mi/mi-var-invalidate.exp 26 Mar 2008 13:14:42 -0000 @@ -55,16 +55,12 @@ mi_gdb_reinitialize_dir $srcdir/$subdir mi_gdb_load ${binfile} =20 # Desc: Create global variable. -mi_gdb_test "-var-create global_simple * global_simple" \ - "\\^done,name=3D\"global_simple\",numchild=3D\"6\",value=3D\".*\",= type=3D\"simpleton\"" \ - "create global variable" +mi_create_varobj global_simple global_simple "create global variable" =20 mi_runto do_locals_tests =20 # Desc: create local variables -mi_gdb_test "-var-create linteger * linteger" \ - "\\^done,name=3D\"linteger\",numchild=3D\"0\",value=3D\".*\",type=3D\"int= \"" \ - "create local variable linteger" +mi_create_varobj linteger linteger "create local variable linteger" =20 # # Reload the same binary. Index: gdb.mi/mi2-var-block.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-block.exp,v retrieving revision 1.9 diff -u -p -r1.9 mi2-var-block.exp --- gdb.mi/mi2-var-block.exp 1 Jan 2008 22:53:20 -0000 1.9 +++ gdb.mi/mi2-var-block.exp 26 Mar 2008 13:14:42 -0000 @@ -44,9 +44,7 @@ mi_runto do_block_tests =20 # Test: c_variable-3.2 # Desc: create cb and foo -mi_gdb_test "-var-create cb * cb" \ - "\\^done,name=3D\"cb\",numchild=3D\"0\",value=3D\".*\",type=3D\"int\"" \ - "create local variable cb" +mi_create_varobj "cb" "cb" "create local variable cb" =20 mi_gdb_test "-var-create foo * foo" \ "&\"mi_cmd_var_create: unable to create variable object\\\\n\".*\\^error,= msg=3D\"mi_cmd_var_create: unable to create variable object\"" \ @@ -66,9 +64,7 @@ mi_gdb_test "-var-delete foo" \ =20 # Test: c_variable-3.3 # Desc: create foo -mi_gdb_test "-var-create foo * foo" \ - "\\^done,name=3D\"foo\",numchild=3D\"0\",value=3D\".*\",type=3D\"int\"" \ - "create local variable foo" +mi_create_varobj "foo" "foo" "create local variable foo" =20 # step to "foo2 =3D 123;" mi_step_to "do_block_tests" "" "var-cmd.c" \ @@ -88,9 +84,7 @@ mi_step_to "do_block_tests" "" "var-cmd. =20 # Test: c_variable-3.5 # Desc: create inner block foo -mi_gdb_test "-var-create inner_foo * foo" \ - "\\^done,name=3D\"inner_foo\",numchild=3D\"0\",value=3D\".*\",type=3D\"in= t\"" \ - "create local variable inner_foo" +mi_create_varobj "inner_foo" "foo" "create local variable inner_foo" =20 # step to "foo2 =3D 0;" mi_step_to "do_block_tests" "" "var-cmd.c" \ @@ -99,9 +93,7 @@ mi_step_to "do_block_tests" "" "var-cmd. =20 # Test: c_variable-3.6 # Desc: create foo2 -mi_gdb_test "-var-create foo2 * foo2" \ - "\\^done,name=3D\"foo2\",numchild=3D\"0\",value=3D\".*\",type=3D\"int\"" \ - "create local variable foo2" +mi_create_varobj "foo2" "foo2" "create local variable foo2" =20 # Test: c_variable-3.7 # Desc: check that outer foo in scope and inner foo out of scope Index: gdb.mi/mi2-var-child.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-child.exp,v retrieving revision 1.12 diff -u -p -r1.12 mi2-var-child.exp --- gdb.mi/mi2-var-child.exp 17 Jan 2008 14:34:22 -0000 1.12 +++ gdb.mi/mi2-var-child.exp 26 Mar 2008 13:14:42 -0000 @@ -53,17 +53,29 @@ mi_continue_to_line $line_dlt_first_real =20 # Test: c_variable-4.2 # Desc: create variable "struct_declarations" -mi_gdb_test "-var-create struct_declarations * struct_declarations" \ - "\\^done,name=3D\"struct_declarations\",numchild=3D\"11\",value=3D\"{...}= \",type=3D\"struct _struct_decl\"" \ +mi_create_varobj "struct_declarations" "struct_declarations" \ "create local variable struct_declarations" =20 # 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=3D\"11\",children=3D\\\[child=3D\{name=3D\"struct_decla= rations.integer\",exp=3D\"integer\",numchild=3D\"0\",type=3D\"int\"\},child= =3D\{name=3D\"struct_declarations.character\",exp=3D\"character\",numchild= =3D\"0\",type=3D\"char\"\},child=3D{name=3D\"struct_declarations.char_ptr\"= ,exp=3D\"char_ptr\",numchild=3D\"1\",type=3D\"char \\*\"\},child=3D\{name= =3D\"struct_declarations.long_int\",exp=3D\"long_int\",numchild=3D\"0\",typ= e=3D\"long int\"\},child=3D\{name=3D\"struct_declarations.int_ptr_ptr\",exp= =3D\"int_ptr_ptr\",numchild=3D\"1\",type=3D\"int \\*\\*\"\},child=3D\{name= =3D\"struct_declarations.long_array\",exp=3D\"long_array\",numchild=3D\"10\= ",type=3D\"long int \\\[10\\\]\"\},child=3D\{name=3D\"struct_declarations.f= unc_ptr\",exp=3D\"func_ptr\",numchild=3D\"0\",type=3D\"void \\(\\*\\)\\((vo= id)?\\)\"\},child=3D\{name=3D\"struct_declarations.func_ptr_struct\",exp=3D= \"func_ptr_struct\",numchild=3D\"0\",type=3D\"struct _struct_decl \\(\\*\\)= \\((int, char \\*, long int)?\\)\"\},child=3D\{name=3D\"struct_declarations= .func_ptr_ptr\",exp=3D\"func_ptr_ptr\",numchild=3D\"0\",type=3D\"struct _st= ruct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\)\"\},child=3D\{name= =3D\"struct_declarations.u1\",exp=3D\"u1\",numchild=3D\"4\",type=3D\"union = \{\\.\\.\\.\}\"\},child=3D\{name=3D\"struct_declarations.s2\",exp=3D\"s2\",= numchild=3D\"4\",type=3D\"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 10 "long int \\[10\\]"} + {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" + =20 #gdbtk_test c_variable-4.3 {children of struct_declarations} { # get_children struct_declarations @@ -77,9 +89,8 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.5 # Desc: children of struct_declarations.integer -mi_gdb_test "-var-list-children struct_declarations.integer" \ - "\\^done,numchild=3D\"0\"" \ - "get children of struct_declarations.integer" +mi_list_varobj_children "struct_declarations.integer" {} \ + "get children of struct_declarations.integer" =20 # Test: c_variable-4.6 # Desc: number of children of struct_declarations.integer @@ -89,8 +100,7 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.7 # Desc: children of struct_declarations.character -mi_gdb_test "-var-list-children struct_declarations.character" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.character" {} \ "get children of struct_declarations.character" =20 # Test: c_variable-4.8 @@ -101,9 +111,9 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.9 # Desc: children of struct_declarations.char_ptr -mi_gdb_test "-var-list-children struct_declarations.char_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.char_ptr.\\*char_ptr\",exp=3D\"\\*char_ptr\",numchild=3D\"0\",type= =3D\"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" =20 # Test: c_variable-4.10 # Desc: number of children of struct_declarations.char_ptr @@ -113,8 +123,7 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.11 # Desc: children of struct_declarations.long_int -mi_gdb_test "-var-list-children struct_declarations.long_int" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.long_int" {} \ "get children of struct_declarations.long_int" =20 # Test: c_variable-4.12 @@ -125,9 +134,9 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.13 # Desc: children of int_ptr_ptr -mi_gdb_test "-var-list-children struct_declarations.int_ptr_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.int_ptr_ptr.\\*int_ptr_ptr\",exp=3D\"\\*int_ptr_ptr\",numchild=3D\"1= \",type=3D\"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 {in= t \*}} +} "get children of struct_declarations.int_ptr_ptr" =20 #gdbtk_test c_variable-4.13 {children of int_ptr_ptr} { # get_children struct_declarations.int_ptr_ptr @@ -142,9 +151,8 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.15 # Desc: children of struct_declarations.long_array -mi_gdb_test "-var-list-children struct_declarations.long_array" \ - "\\^done,numchild=3D\"10\",children=3D\\\[child=3D\{name=3D\"struct_decla= rations.long_array.0\",exp=3D\"0\",numchild=3D\"0\",type=3D\"long int\"\},c= hild=3D\{name=3D\"struct_declarations.long_array.1\",exp=3D\"1\",numchild= =3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declarations.long_= array.2\",exp=3D\"2\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name= =3D\"struct_declarations.long_array.3\",exp=3D\"3\",numchild=3D\"0\",type= =3D\"long int\"\},child=3D\{name=3D\"struct_declarations.long_array.4\",exp= =3D\"4\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_d= eclarations.long_array.5\",exp=3D\"5\",numchild=3D\"0\",type=3D\"long int\"= \},child=3D\{name=3D\"struct_declarations.long_array.6\",exp=3D\"6\",numchi= ld=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declarations.lon= g_array.7\",exp=3D\"7\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{na= me=3D\"struct_declarations.long_array.8\",exp=3D\"8\",numchild=3D\"0\",type= =3D\"long int\"\},child=3D\{name=3D\"struct_declarations.long_array.9\",exp= =3D\"9\",numchild=3D\"0\",type=3D\"long int\"\}\\\]" \ - "get children of struct_declarations.long_array" +mi_list_array_varobj_children "struct_declarations.long_array" 10 "long in= t" \ + "get children of struct_declarations.long_array" =20 # Test: c_variable-4.16 # Desc: number of children of struct_declarations.long_array @@ -154,11 +162,9 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.17 # Desc: children of struct_declarations.func_ptr -mi_gdb_test "-var-list-children struct_declarations.func_ptr" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.func_ptr" {} \ "get children of struct_declarations.func_ptr" =20 - # 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" \ @@ -168,8 +174,7 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.func_ptr_struct" {} \ "get children of struct_declarations.func_ptr_struct" =20 # Test: c_variable-4.20 @@ -181,22 +186,23 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.func_ptr_ptr" {} \ "get children of struct_declarations.func_ptr_ptr" =20 # 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=3D\"0\"" \ - "get number of children of struct_declarations.func_ptr_ptr" - + "\\^done,numchild=3D\"0\"" \ + "get number of children of struct_declarations.func_ptr_ptr" =20 # Test: c_variable-4.23 # Desc: children of struct_declarations.u1 -mi_gdb_test "-var-list-children struct_declarations.u1" \ - "\\^done,numchild=3D\"4\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.u1.a\",exp=3D\"a\",numchild=3D\"0\",type=3D\"int\"\},child=3D\{name= =3D\"struct_declarations.u1.b\",exp=3D\"b\",numchild=3D\"1\",type=3D\"char = \\*\"\},child=3D\{name=3D\"struct_declarations.u1.c\",exp=3D\"c\",numchild= =3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declarations.u1.d\= ",exp=3D\"d\",numchild=3D\"0\",type=3D\"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" =20 # Test: c_variable-4.24 # Desc: number of children of struct_declarations.u1 @@ -206,9 +212,13 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.25 # Desc: children of struct_declarations.s2 -mi_gdb_test "-var-list-children struct_declarations.s2" \ - "\\^done,numchild=3D\"4\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.s2.u2\",exp=3D\"u2\",numchild=3D\"3\",type=3D\"union \{\\.\\.\\.\}\"= \},child=3D\{name=3D\"struct_declarations.s2.g\",exp=3D\"g\",numchild=3D\"0= \",type=3D\"int\"\},child=3D\{name=3D\"struct_declarations.s2.h\",exp=3D\"h= \",numchild=3D\"0\",type=3D\"char\"\},child=3D\{name=3D\"struct_declaration= s.s2.i\",exp=3D\"i\",numchild=3D\"10\",type=3D\"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} @@ -220,119 +230,18 @@ mi_gdb_test "-var-info-num-children stru "get number of children of struct_declarations.s2" =20 =20 -# 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=3D\"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=3D\"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=3D\"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=3D\"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=3D\"0\"" \ - "get children of struct_declarations.long_array.3" - -# 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" \ - "\\^done,numchild=3D\"0\"" \ - "get number of children of struct_declarations.long_array.3" - -# Test: c_variable-4.33=20 -# Desc: children of struct_declarations.long_array.4 -mi_gdb_test "-var-list-children struct_declarations.long_array.4" \ - "\\^done,numchild=3D\"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=3D\"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=3D\"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=3D\"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=3D\"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=3D\"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=3D\"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=3D\"0\"" \ - "get number of children of struct_declarations.long_array.7" +for {set i 1} {$i <=3D 9} {incr i} { + mi_list_varobj_children "struct_declarations.long_array.$i" {} \ + "get children of struct_declarations.long_array.$i" =20 -# Test: c_variable-4.41 -# Desc: children of struct_declarations.long_array.8 -mi_gdb_test "-var-list-children struct_declarations.long_array.8" \ + mi_gdb_test "-var-info-num-children struct_declarations.long_array.$i"= \ "\\^done,numchild=3D\"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=3D\"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=3D\"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=3D\"0\"" \ - "get number of children of struct_declarations.long_array.9" + "get number of children of struct_declarations.long_array.$i" +} =20 # Test: c_variable-4.45 # Desc: children of struct_declarations.u1.a -mi_gdb_test "-var-list-children struct_declarations.u1.a" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.u1.a" {} \ "get children of struct_declarations.u1.a" =20 # Test: c_variable-4.46 @@ -343,9 +252,9 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.47 # Desc: children of struct_declarations.u1.b -mi_gdb_test "-var-list-children struct_declarations.u1.b" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.u1.b.\\*b\",exp=3D\"\\*b\",numchild=3D\"0\",type=3D\"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" =20 # Test: c_variable-4.48 # Desc: number of children of struct_declarations.u1.b @@ -355,8 +264,7 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.49 # Desc: children of struct_declarations.u1.c -mi_gdb_test "-var-list-children struct_declarations.u1.c" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.u1.c" {} \ "get children of struct_declarations.u1.c" =20 # Test: c_variable-4.50 @@ -367,8 +275,7 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.51 # Desc: children of struct_declarations.u1.d -mi_gdb_test "-var-list-children struct_declarations.u1.d" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children "struct_declarations.u1.d" {} \ "get children of struct_declarations.u1.d" =20 =20 @@ -381,9 +288,11 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.53 # Desc: children of struct_declarations.s2.u2 -mi_gdb_test "-var-list-children struct_declarations.s2.u2" \ - "\\^done,numchild=3D\"3\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.s2.u2.u1s1\",exp=3D\"u1s1\",numchild=3D\"4\",type=3D\"struct \{\\.\\= .\\.\}\"\},child=3D\{name=3D\"struct_declarations.s2.u2.f\",exp=3D\"f\",num= child=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declarations.= s2.u2.u1s2\",exp=3D\"u1s2\",numchild=3D\"2\",type=3D\"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" =20 # Test: c_variable-4.54 # Desc: number of children of struct_declarations.s2.u2 @@ -393,8 +302,7 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.55 # Desc: children of struct_declarations.s2.g -mi_gdb_test "-var-list-children struct_declarations.s2.g" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children struct_declarations.s2.g {} \ "get children of struct_declarations.s2.g" =20 # Test: c_variable-4.56 @@ -406,8 +314,7 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.57 # Desc: children of struct_declarations.s2.h -mi_gdb_test "-var-list-children struct_declarations.s2.h" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children struct_declarations.s2.h {} \ "get children of struct_declarations.s2.h" =20 # Test: c_variable-4.58 @@ -419,8 +326,11 @@ mi_gdb_test "-var-info-num-children stru =20 # Test: c_variable-4.59 # Desc: children of struct_declarations.s2.i -mi_gdb_test "-var-list-children struct_declarations.s2.i" \ - "\\^done,numchild=3D\"10\",children=3D\\\[child=3D\{name=3D\"struct_decla= rations.s2.i.0\",exp=3D\"0\",numchild=3D\"0\",type=3D\"long int\"\},child= =3D\{name=3D\"struct_declarations.s2.i.1\",exp=3D\"1\",numchild=3D\"0\",typ= e=3D\"long int\"\},child=3D\{name=3D\"struct_declarations.s2.i.2\",exp=3D\"= 2\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declar= ations.s2.i.3\",exp=3D\"3\",numchild=3D\"0\",type=3D\"long int\"\},child=3D= \{name=3D\"struct_declarations.s2.i.4\",exp=3D\"4\",numchild=3D\"0\",type= =3D\"long int\"\},child=3D\{name=3D\"struct_declarations.s2.i.5\",exp=3D\"5= \",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declara= tions.s2.i.6\",exp=3D\"6\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\= {name=3D\"struct_declarations.s2.i.7\",exp=3D\"7\",numchild=3D\"0\",type=3D= \"long int\"\},child=3D\{name=3D\"struct_declarations.s2.i.8\",exp=3D\"8\",= numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"struct_declaratio= ns.s2.i.9\",exp=3D\"9\",numchild=3D\"0\",type=3D\"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" =20 # Test: c_variable-4.60 @@ -431,9 +341,12 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"4\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.s2.u2.u1s1.d\",exp=3D\"d\",numchild=3D\"0\",type=3D\"int\"\},child= =3D\{name=3D\"struct_declarations.s2.u2.u1s1.e\",exp=3D\"e\",numchild=3D\"1= 0\",type=3D\"char \\\[10\\\]\"\},child=3D\{name=3D\"struct_declarations.s2.= u2.u1s1.func\",exp=3D\"func\",numchild=3D\"0\",type=3D\"int \\*\\(\\*\\)\\(= (void)?\\)\"\},child=3D\{name=3D\"struct_declarations.s2.u2.u1s1.foo\",exp= =3D\"foo\",numchild=3D\"0\",type=3D\"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" =20 # Test: c_variable-4.62 # Desc: number of children of struct_declarations.s2.u2.u1s1 @@ -443,8 +356,7 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"0\"" \ +mi_list_varobj_children struct_declarations.s2.u2.f {} \ "get children of struct_declarations.s2.u2.f" =20 # Test: c_variable-4.64 @@ -455,9 +367,10 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"2\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.s2.u2.u1s2.array_ptr\",exp=3D\"array_ptr\",numchild=3D\"2\",type=3D\= "char \\\[2\\\]\"\},child=3D\{name=3D\"struct_declarations.s2.u2.u1s2.func\= ",exp=3D\"func\",numchild=3D\"0\",type=3D\"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" =20 # Test: c_variable-4.66 # Desc: number of children of struct_declarations.s2.u2.u1s2 @@ -467,8 +380,7 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"0\"" \ +mi_list_varobj_children struct_declarations.s2.u2.u1s1.d {} \ "get children of struct_declarations.s2.u2.u1s1.d" =20 # Test: c_variable-4.68 @@ -479,8 +391,11 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"10\",children=3D\\\[child=3D\{name=3D\"struct_decla= rations.s2.u2.u1s1.e.0\",exp=3D\"0\",numchild=3D\"0\",type=3D\"char\"\},chi= ld=3D\{name=3D\"struct_declarations.s2.u2.u1s1.e.1\",exp=3D\"1\",numchild= =3D\"0\",type=3D\"char\"\},child=3D\{name=3D\"struct_declarations.s2.u2.u1s= 1.e.2\",exp=3D\"2\",numchild=3D\"0\",type=3D\"char\"\},child=3D{name=3D\"st= ruct_declarations.s2.u2.u1s1.e.3\",exp=3D\"3\",numchild=3D\"0\",type=3D\"ch= ar\"\},child=3D\{name=3D\"struct_declarations.s2.u2.u1s1.e.4\",exp=3D\"4\",= numchild=3D\"0\",type=3D\"char\"\},child=3D\{name=3D\"struct_declarations.s= 2.u2.u1s1.e.5\",exp=3D\"5\",numchild=3D\"0\",type=3D\"char\"\},child=3D\{na= me=3D\"struct_declarations.s2.u2.u1s1.e.6\",exp=3D\"6\",numchild=3D\"0\",ty= pe=3D\"char\"\},child=3D\{name=3D\"struct_declarations.s2.u2.u1s1.e.7\",exp= =3D\"7\",numchild=3D\"0\",type=3D\"char\"\},child=3D\{name=3D\"struct_decla= rations.s2.u2.u1s1.e.8\",exp=3D\"8\",numchild=3D\"0\",type=3D\"char\"\},chi= ld=3D\{name=3D\"struct_declarations.s2.u2.u1s1.e.9\",exp=3D\"9\",numchild= =3D\"0\",type=3D\"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" =20 # Test: c_variable-4.70 @@ -492,8 +407,7 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"0\"" \ +mi_list_varobj_children struct_declarations.s2.u2.u1s1.func {} \ "get children of struct_declarations.s2.u2.u1s1.func" =20 # Test: c_variable-4.72 @@ -505,8 +419,7 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"0\"" \ +mi_list_varobj_children struct_declarations.s2.u2.u1s1.foo {} \ "get children of struct_declarations.s2.u2.u1s1.foo" =20 # Test: c_variable-4.74 @@ -518,9 +431,10 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"2\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.s2.u2.u1s2.array_ptr.0\",exp=3D\"0\",numchild=3D\"0\",type=3D\"char\= "\},child=3D{name=3D\"struct_declarations.s2.u2.u1s2.array_ptr.1\",exp=3D\"= 1\",numchild=3D\"0\",type=3D\"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" =20 # Test: c_variable-4.76 # Desc: number of children of struct_declarations.s2.u2.u1s2.array_ptr @@ -530,8 +444,7 @@ mi_gdb_test "-var-info-num-children stru =20 # 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=3D\"0\"" \ +mi_list_varobj_children struct_declarations.s2.u2.u1s2.func {} \ "get children of struct_declarations.s2.u2.u1s2.func" =20 # Test: c_variable-4.78 @@ -542,10 +455,10 @@ mi_gdb_test "-var-info-num-children stru =20 # 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_p= tr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"struct_declar= ations.int_ptr_ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=3D\"\\*\\*int_ptr= _ptr\",numchild=3D\"0\",type=3D\"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" =20 # Test: c_variable-4.80 # Desc: Number of children of struct_declarations.int_ptr_ptr.*int_ptr_ptr @@ -561,15 +474,25 @@ mi_step_to do_children_tests {} {.*var-c =20 # Test: c_variable-4.81 # Desc: create local variable "weird" -mi_gdb_test "-var-create weird * weird" \ - "\\^done,name=3D\"weird\",numchild=3D\"11\",value=3D\"$hex\",type=3D\"wei= rd_struct \\*\"" \ - "create local variable weird" +mi_create_varobj weird weird "create local variable weird" =20 # Test: c_variable-4.82 # Desc: children of weird -mi_gdb_test "-var-list-children weird" \ - "\\^done,numchild=3D\"11\",children=3D\\\[child=3D\{name=3D\"weird.intege= r\",exp=3D\"integer\",numchild=3D\"0\",type=3D\"int\"\},child=3D\{name=3D\"= weird.character\",exp=3D\"character\",numchild=3D\"0\",type=3D\"char\"\},ch= ild=3D\{name=3D\"weird.char_ptr\",exp=3D\"char_ptr\",numchild=3D\"1\",type= =3D\"char \\*\"\},child=3D\{name=3D\"weird.long_int\",exp=3D\"long_int\",nu= mchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"weird.int_ptr_ptr\"= ,exp=3D\"int_ptr_ptr\",numchild=3D\"1\",type=3D\"int \\*\\*\"\},child=3D\{n= ame=3D\"weird.long_array\",exp=3D\"long_array\",numchild=3D\"10\",type=3D\"= long int \\\[10\\\]\"\},child=3D\{name=3D\"weird.func_ptr\",exp=3D\"func_pt= r\",numchild=3D\"0\",type=3D\"void \\(\\*\\)\\((void)?\\)\"\},child=3D\{nam= e=3D\"weird.func_ptr_struct\",exp=3D\"func_ptr_struct\",numchild=3D\"0\",ty= pe=3D\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int)?\\)\"\},ch= ild=3D\{name=3D\"weird.func_ptr_ptr\",exp=3D\"func_ptr_ptr\",numchild=3D\"0= \",type=3D\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int)?\\= )\"\},child=3D\{name=3D\"weird.u1\",exp=3D\"u1\",numchild=3D\"4\",type=3D\"= union \{\\.\\.\\.\}\"\},child=3D\{name=3D\"weird.s2\",exp=3D\"s2\",numchild= =3D\"4\",type=3D\"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 10 "long int \\[10\\]"} + {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" =20 # Test: c_variable-4.83 # Desc: number of children of weird @@ -580,8 +503,7 @@ mi_gdb_test "-var-info-num-children weir =20 # Test: c_variable-4.84 # Desc: children of weird->long_array -mi_gdb_test "-var-list-children weird.long_array" \ - "\\^done,numchild=3D\"10\",children=3D\\\[child=3D\{name=3D\"weird.long_a= rray.0\",exp=3D\"0\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name= =3D\"weird.long_array.1\",exp=3D\"1\",numchild=3D\"0\",type=3D\"long int\"\= },child=3D\{name=3D\"weird.long_array.2\",exp=3D\"2\",numchild=3D\"0\",type= =3D\"long int\"\},child=3D\{name=3D\"weird.long_array.3\",exp=3D\"3\",numch= ild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"weird.long_array.4\",e= xp=3D\"4\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"weird.= long_array.5\",exp=3D\"5\",numchild=3D\"0\",type=3D\"long int\"\},child=3D\= {name=3D\"weird.long_array.6\",exp=3D\"6\",numchild=3D\"0\",type=3D\"long i= nt\"\},child=3D\{name=3D\"weird.long_array.7\",exp=3D\"7\",numchild=3D\"0\"= ,type=3D\"long int\"\},child=3D\{name=3D\"weird.long_array.8\",exp=3D\"8\",= numchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"weird.long_array.= 9\",exp=3D\"9\",numchild=3D\"0\",type=3D\"long int\"\}\\\]" \ +mi_list_array_varobj_children weird.long_array 10 "long int" \ "get children of weird.long_array" #gdbtk_test c_variable-4.84 {children of weird->long_array} { # get_children weird.long_array @@ -595,9 +517,9 @@ mi_gdb_test "-var-info-num-children weir =20 # Test: c_variable-4.86 # Desc: children of weird.int_ptr_ptr -mi_gdb_test "-var-list-children weird.int_ptr_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"weird.int_ptr= _ptr.\\*int_ptr_ptr\",exp=3D\"\\*int_ptr_ptr\",numchild=3D\"1\",type=3D\"in= t \\*\"\}\\\]" \ - "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} @@ -610,9 +532,9 @@ mi_gdb_test "-var-info-num-children weir =20 # 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=3D\"1\",children=3D\\\[child=3D\{name=3D\"weird.int_ptr= _ptr.\\*int_ptr_ptr.\\*\\*int_ptr_ptr\",exp=3D\"\\*\\*int_ptr_ptr\",numchil= d=3D\"0\",type=3D\"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} @@ -625,16 +547,14 @@ mi_gdb_test "-var-info-num-children weir =20 # 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=3D\"weird->int_ptr_ptr\",numchild=3D\"1\",value=3D\"$hex\",= type=3D\"int \\*\\*\"" \ +mi_create_varobj "weird->int_ptr_ptr" "weird->int_ptr_ptr" \ "create local variable weird->int_ptr_ptr" =20 # Test: c_variable-4.91 # Desc: children of weird->int_ptr_ptr -mi_gdb_test "-var-list-children weird->int_ptr_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"weird->int_pt= r_ptr.\\*weird->int_ptr_ptr\",exp=3D\"\\*weird->int_ptr_ptr\",numchild=3D\"= 1\",type=3D\"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 {i= nt \*}} +} "get children of weird->int_ptr_ptr" =20 # Test: c_variable-4.92 # Desc: number of children of (weird->int_ptr_ptr) @@ -644,9 +564,10 @@ mi_gdb_test "-var-info-num-children weir =20 # 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=3D\"1\",children=3D\\\[child=3D\{name=3D\"weird->int_pt= r_ptr.\\*weird->int_ptr_ptr.\\*\\*weird->int_ptr_ptr\",exp=3D\"\\*\\*weird-= >int_ptr_ptr\",numchild=3D\"0\",type=3D\"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" =20 # Test: c_variable-4.94 # Desc: number of children of *(weird->int_ptr_ptr) @@ -656,14 +577,12 @@ mi_gdb_test "-var-info-num-children weir =20 # 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.**w= eird->int_ptr_ptr" \ - "\\^done,numchild=3D\"0\"" \ +mi_list_varobj_children "weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->i= nt_ptr_ptr" {} \ "get children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->int_ptr_= ptr" =20 # 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=3D\"0\"" \ +mi_list_varobj_children "weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird->i= nt_ptr_ptr" {} \ "get number of children of weird->int_ptr_ptr.*weird->int_ptr_ptr.**weird= ->int_ptr_ptr" =20 # Test: c_variable-4.97 @@ -867,15 +786,14 @@ mi_execute_to "exec-step 43" "end-steppi =20 # Test: c_variable-5.10 # Desc: create psnp->char_ptr -mi_gdb_test "-var-create psnp->char_ptr * psnp->char_ptr" \ - "\\^done,name=3D\"psnp->char_ptr\",numchild=3D\"1\",value=3D\".*\",type= =3D\"char \\*\\*\\*\\*\"" \ +mi_create_varobj "psnp->char_ptr" "psnp->char_ptr" \ "create local variable psnp->char_ptr" =20 # Test: c_variable-5.11 # Desc: children of psnp->char_ptr -mi_gdb_test "-var-list-children psnp->char_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->char_pt= r.\\*psnp->char_ptr\",exp=3D\"\\*psnp->char_ptr\",numchild=3D\"1\",type=3D\= "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" =20 # Test: c_variable-5.12 # Desc: number of children of psnp->char_ptr @@ -885,9 +803,10 @@ mi_gdb_test "-var-info-num-children psnp =20 # 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=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->char_pt= r.\\*psnp->char_ptr.\\*\\*psnp->char_ptr\",exp=3D\"\\*\\*psnp->char_ptr\",n= umchild=3D\"1\",type=3D\"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" =20 # Test: c_variable-5.14 # Desc: number of children of *(psnp->char_ptr) @@ -897,15 +816,17 @@ mi_gdb_test "-var-info-num-children psnp =20 # Test: c_variable-5.15 # Desc: children of *(*(psnp->char_ptr)) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->cha= r_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->char_pt= r.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr\",exp=3D\"= \\*\\*\\*psnp->char_ptr\",numchild=3D\"1\",type=3D\"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" =20 # Test: c_variable-5.15B # Desc: children of *(*(*(psnp->char_ptr))) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->cha= r_ptr.***psnp->char_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->char_pt= r.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\= \*psnp->char_ptr\",exp=3D\"\\*\\*\\*\\*psnp->char_ptr\",numchild=3D\"0\",ty= pe=3D\"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" =20 # Test: c_variable-5.16 # Desc: number of children of *(*(psnp->char_ptr)) @@ -915,9 +836,10 @@ mi_gdb_test "-var-info-num-children psnp =20 # Test: c_variable-5.17 # Desc: children of *(*(*(psnp->char_ptr))) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->cha= r_ptr.***psnp->char_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->char_pt= r.\\*psnp->char_ptr.\\*\\*psnp->char_ptr.\\*\\*\\*psnp->char_ptr.\\*\\*\\*\= \*psnp->char_ptr\",exp=3D\"\\*\\*\\*\\*psnp->char_ptr\",numchild=3D\"0\",ty= pe=3D\"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" =20 # Test: c_variable-5.18 # Desc: number of children of *(*(*(psnp->char_ptr))) @@ -927,8 +849,7 @@ mi_gdb_test "-var-info-num-children psnp =20 # Test: c_variable-5.17B # Desc: children of *(*(*(*(psnp->char_ptr)))) -mi_gdb_test "-var-list-children psnp->char_ptr.*psnp->char_ptr.**psnp->cha= r_ptr.***psnp->char_ptr.****psnp->char_ptr" \ - "\\^done,numchild=3D\"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" =20 # Test: c_variable-5.18B @@ -937,18 +858,16 @@ mi_gdb_test "-var-info-num-children psnp "\\^done,numchild=3D\"0\"" \ "get number of children of psnp->char_ptr.*psnp->char_ptr.**psnp->char_pt= r.***psnp->char_ptr.****psnp->char_ptr" =20 - # Test: c_variable-5.19 # Desc: create psnp->long_ptr -mi_gdb_test "-var-create psnp->long_ptr * psnp->long_ptr" \ - "\\^done,name=3D\"psnp->long_ptr\",numchild=3D\"1\",value=3D\"$hex\",type= =3D\"long int \\*\\*\\*\\*\"" \ +mi_create_varobj "psnp->long_ptr" "psnp->long_ptr" \ "create local variable psnp->long_ptr" =20 # Test: c_variable-5.20 # Desc: children of psnp->long_ptr -mi_gdb_test "-var-list-children psnp->long_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->long_pt= r.\\*psnp->long_ptr\",exp=3D\"\\*psnp->long_ptr\",numchild=3D\"1\",type=3D\= "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" =20 # Test: c_variable-5.21 # Desc: number of children of psnp->long_ptr @@ -958,9 +877,9 @@ mi_gdb_test "-var-info-num-children psnp =20 # 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=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->long_pt= r.\\*psnp->long_ptr.\\*\\*psnp->long_ptr\",exp=3D\"\\*\\*psnp->long_ptr\",n= umchild=3D\"1\",type=3D\"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" =20 =20 # Test: c_variable-5.23 @@ -971,9 +890,10 @@ mi_gdb_test "-var-info-num-children psnp =20 # Test: c_variable-5.24 # Desc: children of *(*(psnp->long_ptr)) -mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->lon= g_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->long_pt= r.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr\",exp=3D\"= \\*\\*\\*psnp->long_ptr\",numchild=3D\"1\",type=3D\"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" =20 # Test: c_variable-5.25 # Desc: number of children of *(*(psnp->long_ptr)) @@ -983,9 +903,10 @@ mi_gdb_test "-var-info-num-children psnp =20 # Test: c_variable-5.26 # Desc: children of *(*(*(psnp->long_ptr))) -mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->lon= g_ptr.***psnp->long_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->long_pt= r.\\*psnp->long_ptr.\\*\\*psnp->long_ptr.\\*\\*\\*psnp->long_ptr.\\*\\*\\*\= \*psnp->long_ptr\",exp=3D\"\\*\\*\\*\\*psnp->long_ptr\",numchild=3D\"0\",ty= pe=3D\"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" =20 # Test: c_variable-5.27 # Desc: number of children of *(*(*(psnp->long_ptr))) @@ -995,8 +916,7 @@ mi_gdb_test "-var-info-num-children psnp =20 # Test: c_variable-5.28 # Desc: children of *(*(*(*(psnp->long_ptr)))) -mi_gdb_test "-var-list-children psnp->long_ptr.*psnp->long_ptr.**psnp->lon= g_ptr.***psnp->long_ptr.****psnp->long_ptr" \ - "\\^done,numchild=3D\"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" =20 # Test: c_variable-5.29 @@ -1005,17 +925,19 @@ mi_gdb_test "-var-info-num-children psnp "\\^done,numchild=3D\"0\"" \ "get number of children of psnp->long_ptr.*psnp->long_ptr.**psnp->long_pt= r.***psnp->long_ptr.****psnp->long_ptr" =20 + # Test: c_variable-5.30 # Desc: create psnp->ptrs -mi_gdb_test "-var-create psnp->ptrs * psnp->ptrs" \ - "\\^done,name=3D\"psnp->ptrs\",numchild=3D\"3\",value=3D\"\\\[3\\\]\",typ= e=3D\"struct _struct_n_pointer \\*\\\[3\\\]\"" \ +mi_create_varobj "psnp->ptrs" "psnp->ptrs" \ "create local variable psnp->ptrs" =20 # Test: c_variable-5.31 # Desc: children of psnp->ptrs -mi_gdb_test "-var-list-children psnp->ptrs" \ - "\\^done,numchild=3D\"3\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0\= ",exp=3D\"0\",numchild=3D\"4\",type=3D\"struct _struct_n_pointer \\*\"\},ch= ild=3D\{name=3D\"psnp->ptrs.1\",exp=3D\"1\",numchild=3D\"4\",type=3D\"struc= t _struct_n_pointer \\*\"\},child=3D\{name=3D\"psnp->ptrs.2\",exp=3D\"2\",n= umchild=3D\"4\",type=3D\"struct _struct_n_pointer \\*\"\}\\\]" \ - "get children of psnp->ptrs" +mi_list_varobj_children "psnp->ptrs" {=20=20=20=20 + {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" =20 # Test: c_variable-5.32 # Desc: number of children of psnp->ptrs @@ -1025,9 +947,12 @@ mi_gdb_test "-var-info-num-children psnp =20 # Test: c_variable-5.33 # Desc: children of psnp->ptrs[0] -mi_gdb_test "-var-list-children psnp->ptrs.0" \ - "\\^done,numchild=3D\"4\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= char_ptr\",exp=3D\"char_ptr\",numchild=3D\"1\",type=3D\"char \\*\\*\\*\\*\"= \},child=3D\{name=3D\"psnp->ptrs.0.long_ptr\",exp=3D\"long_ptr\",numchild= =3D\"1\",type=3D\"long int \\*\\*\\*\\*\"\},child=3D\{name=3D\"psnp->ptrs.0= .ptrs\",exp=3D\"ptrs\",numchild=3D\"3\",type=3D\"struct _struct_n_pointer \= \*\\\[3\\\]\"\},child=3D\{name=3D\"psnp->ptrs.0.next\",exp=3D\"next\",numch= ild=3D\"4\",type=3D\"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" =20 # Test: c_variable-5.34 # Desc: number of children of psnp->ptrs[0] @@ -1037,9 +962,12 @@ mi_gdb_test "-var-info-num-children psnp =20 # Test: c_variable-5.35 # Desc: children of psnp->ptrs[0]->next -mi_gdb_test "-var-list-children psnp->ptrs.0.next" \ - "\\^done,numchild=3D\"4\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.char_ptr\",exp=3D\"char_ptr\",numchild=3D\"1\",type=3D\"char \\*\\*\\*= \\*\"\},child=3D\{name=3D\"psnp->ptrs.0.next.long_ptr\",exp=3D\"long_ptr\",= numchild=3D\"1\",type=3D\"long int \\*\\*\\*\\*\"\},child=3D\{name=3D\"psnp= ->ptrs.0.next.ptrs\",exp=3D\"ptrs\",numchild=3D\"3\",type=3D\"struct _struc= t_n_pointer \\*\\\[3\\\]\"\},child=3D\{name=3D\"psnp->ptrs.0.next.next\",ex= p=3D\"next\",numchild=3D\"4\",type=3D\"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" =20 #} {char_ptr long_ptr ptrs next} =20 @@ -1052,9 +980,9 @@ mi_gdb_test "-var-info-num-children psnp =20 # 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=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.char_ptr.\\*char_ptr\",exp=3D\"\\*char_ptr\",numchild=3D\"1\",type=3D\= "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" =20 #gdbtk_test c_variable-5.37 {children of psnp->ptrs[0]->next->char_ptr} { # get_children psnp->ptrs.0.next.char_ptr @@ -1068,9 +996,9 @@ mi_gdb_test "-var-info-num-children psnp =20 # 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=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.char_ptr.\\*char_ptr.\\*\\*char_ptr\",exp=3D\"\\*\\*char_ptr\",numchil= d=3D\"1\",type=3D\"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" =20 # Test: c_variable-5.40 # Desc: number of children of *psnp->ptrs[0]->next->char_ptr @@ -1080,15 +1008,17 @@ mi_gdb_test "-var-info-num-children psnp =20 # 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.**cha= r_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr\",exp=3D\"\\*\\*= \\*char_ptr\",numchild=3D\"1\",type=3D\"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" =20 # 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.**cha= r_ptr.***char_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char= _ptr\",exp=3D\"\\*\\*\\*\\*char_ptr\",numchild=3D\"0\",type=3D\"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" =20 # Test: c_variable-5.42 # Desc: number of children of **psnp->ptrs[0]->next->char_ptr @@ -1098,9 +1028,10 @@ mi_gdb_test "-var-info-num-children psnp =20 # 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.**cha= r_ptr.***char_ptr" \ - "\\^done,numchild=3D\"1\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.char_ptr.\\*char_ptr.\\*\\*char_ptr.\\*\\*\\*char_ptr.\\*\\*\\*\\*char= _ptr\",exp=3D\"\\*\\*\\*\\*char_ptr\",numchild=3D\"0\",type=3D\"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" =20 # Test: c_variable-5.44 # Desc: number of children of ***psnp->ptrs[0]->next->char_ptr @@ -1110,8 +1041,7 @@ mi_gdb_test "-var-info-num-children psnp =20 # 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.**cha= r_ptr.***char_ptr.****char_ptr" \ - "\\^done,numchild=3D\"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" =20 # Test: c_variable-5.44B @@ -1122,15 +1052,21 @@ mi_gdb_test "-var-info-num-children psnp =20 # 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=3D\"4\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.next.char_ptr\",exp=3D\"char_ptr\",numchild=3D\"1\",type=3D\"char \\*\= \*\\*\\*\"\},child=3D\{name=3D\"psnp->ptrs.0.next.next.long_ptr\",exp=3D\"l= ong_ptr\",numchild=3D\"1\",type=3D\"long int \\*\\*\\*\\*\"\},child=3D\{nam= e=3D\"psnp->ptrs.0.next.next.ptrs\",exp=3D\"ptrs\",numchild=3D\"3\",type=3D= \"struct _struct_n_pointer \\*\\\[3\\\]\"\},child=3D\{name=3D\"psnp->ptrs.0= .next.next.next\",exp=3D\"next\",numchild=3D\"4\",type=3D\"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" + =20 # 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=3D\"3\",children=3D\\\[child=3D\{name=3D\"psnp->ptrs.0.= next.next.ptrs.0\",exp=3D\"0\",numchild=3D\"4\",type=3D\"struct _struct_n_p= ointer \\*\"\},child=3D\{name=3D\"psnp->ptrs.0.next.next.ptrs.1\",exp=3D\"1= \",numchild=3D\"4\",type=3D\"struct _struct_n_pointer \\*\"\},child=3D\{nam= e=3D\"psnp->ptrs.0.next.next.ptrs.2\",exp=3D\"2\",numchild=3D\"4\",type=3D\= "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" =20 # Step over "snp0.char_ptr =3D &b3;" mi_step_to do_children_tests {} {.*var-cmd.c} \ Index: gdb.mi/mi2-var-cmd.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-cmd.exp,v retrieving revision 1.16 diff -u -p -r1.16 mi2-var-cmd.exp --- gdb.mi/mi2-var-cmd.exp 1 Jan 2008 22:53:20 -0000 1.16 +++ gdb.mi/mi2-var-cmd.exp 26 Mar 2008 13:14:42 -0000 @@ -50,9 +50,7 @@ mi_gdb_load ${binfile} # Test: c_variable-1.1 # Desc: Create global variable =20 -mi_gdb_test "111-var-create global_simple * global_simple" \ - "111\\^done,name=3D\"global_simple\",numchild=3D\"6\",value=3D\"{...}\",t= ype=3D\"simpleton\"" \ - "create global variable" +mi_create_varobj "global_simple" "global_simple" "create global variable" =20 # Test: c_variable-1.2 # Desc: Create non-existent variable @@ -78,75 +76,46 @@ mi_continue_to_line $line_dlt_first_real # Test: c_variable-1.4 # Desc: create local variables =20 -mi_gdb_test "-var-create linteger * linteger" \ - "\\^done,name=3D\"linteger\",numchild=3D\"0\",value=3D\".*\",type=3D\"int= \"" \ - "create local variable linteger" +mi_create_varobj_checked linteger linteger int "create local variable lint= eger" + +mi_create_varobj_checked lpinteger lpinteger {int \*} "create local variab= le lpinteger" + +mi_create_varobj_checked lcharacter lcharacter\[0\] char "create local var= iable lcharacter" + +mi_create_varobj_checked lpcharacter lpcharacter {char \*} "create local v= ariable lpcharacter" + +mi_create_varobj_checked llong llong "long int" "create local variable llo= ng" + +mi_create_varobj_checked lplong lplong {long int \*} "create local variabl= e lplong" + +mi_create_varobj_checked lfloat lfloat float "create local variable lfloat" =20 -mi_gdb_test "-var-create lpinteger * lpinteger" \ - "\\^done,name=3D\"lpinteger\",numchild=3D\"1\",value=3D\"$hex\",type=3D\"= int \\*\"" \ - "create local variable lpinteger" - -mi_gdb_test "-var-create lcharacter * lcharacter\[0\]" \ - "\\^done,name=3D\"lcharacter\",numchild=3D\"0\",value=3D\".*\",type=3D\"c= har\"" \ - "create local variable lcharacter " - -mi_gdb_test "-var-create lpcharacter * lpcharacter" \ - "\\^done,name=3D\"lpcharacter\",numchild=3D\"1\",value=3D\"$hex.*\",type= =3D\"char \\*\"" \ - "create local variable lpcharacter" - -mi_gdb_test "-var-create llong * llong" \ - "\\^done,name=3D\"llong\",numchild=3D\"0\",value=3D\".*\",type=3D\"long i= nt\"" \ - "create local variable llong" - -mi_gdb_test "-var-create lplong * lplong" \ - "\\^done,name=3D\"lplong\",numchild=3D\"1\",value=3D\"$hex\",type=3D\"lon= g int \\*\"" \ - "create local variable lplong" - -mi_gdb_test "-var-create lfloat * lfloat" \ - "\\^done,name=3D\"lfloat\",numchild=3D\"0\",value=3D\".*\",type=3D\"float= \"" \ - "create local variable lfloat" - -mi_gdb_test "-var-create lpfloat * lpfloat" \ - "\\^done,name=3D\"lpfloat\",numchild=3D\"1\",value=3D\"$hex\",type=3D\"fl= oat \\*\"" \ - "create local variable lpfloat" - -mi_gdb_test "-var-create ldouble * ldouble" \ - "\\^done,name=3D\"ldouble\",numchild=3D\"0\",value=3D\".*\",type=3D\"doub= le\"" \ - "create local variable ldouble" - -mi_gdb_test "-var-create lpdouble * lpdouble" \ - "\\^done,name=3D\"lpdouble\",numchild=3D\"1\",value=3D\"$hex\",type=3D\"d= ouble \\*\"" \ - "create local variable lpdouble" - -mi_gdb_test "-var-create lsimple * lsimple" \ - "\\^done,name=3D\"lsimple\",numchild=3D\"6\",value=3D\"{...}\",type=3D\"s= truct _simple_struct\"" \ - "create local variable lsimple" - -mi_gdb_test "-var-create lpsimple * lpsimple" \ - "\\^done,name=3D\"lpsimple\",numchild=3D\"6\",value=3D\"$hex\",type=3D\"s= truct _simple_struct \\*\"" \ - "create local variable lpsimple" - -mi_gdb_test "-var-create func * func" \ - "\\^done,name=3D\"func\",numchild=3D\"0\",value=3D\".*\",type=3D\"void \\= (\\*\\)\\((void|)\\)\"" \ - "create local variable func" +mi_create_varobj_checked lpfloat lpfloat {float \*} "create local variable= lpfloat" + +mi_create_varobj_checked ldouble ldouble double "create local variable ldo= uble" + +mi_create_varobj_checked lpdouble lpdouble {double \*} "create local varia= ble lpdouble" + +mi_create_varobj_checked lsimple lsimple "struct _simple_struct" "create l= ocal variable lsimple" + +mi_create_varobj_checked lpsimple lpsimple {struct _simple_struct \*} "cre= ate local variable lpsimple" + +mi_create_varobj_checked func func {void \(\*\)\((void|)\)} "create local = variable func" =20 # Test: c_variable-1.5 # Desc: create lsimple.character -mi_gdb_test "-var-create lsimple.character * lsimple.character" \ - "\\^done,name=3D\"lsimple.character\",numchild=3D\"0\",value=3D\".*\",typ= e=3D\"char\"" \ +mi_create_varobj_checked lsimple.character lsimple.character "char" \ "create lsimple.character" =20 # Test: c_variable-1.6 # Desc: create lpsimple->integer -mi_gdb_test "-var-create lsimple->integer * lsimple->integer" \ - "\\^done,name=3D\"lsimple->integer\",numchild=3D\"0\",value=3D\".*\",type= =3D\"int\"" \ +mi_create_varobj_checked lsimple->integer lsimple->integer "int" \ "create lsimple->integer" =20 # Test: c_variable-1.7 -# Desc: ceate lsimple.integer -mi_gdb_test "-var-create lsimple.integer * lsimple.integer" \ - "\\^done,name=3D\"lsimple.integer\",numchild=3D\"0\",value=3D\".*\",type= =3D\"int\"" \ - "create lsimple->integer" +# Desc: crate lsimple.integer +mi_create_varobj_checked lsimple.integer lsimple.integer "int" \ + "create lsimple.integer" =20 =20 # Test: c_variable-1.9 @@ -401,13 +370,9 @@ mi_continue_to "subroutine1" =20 # Test: c_variable-2.10 # Desc: create variable for locals i,l in subroutine1 -mi_gdb_test "-var-create i * i" \ - "\\^done,name=3D\"i\",numchild=3D\"0\",value=3D\"4321\",type=3D\"int\"" \ - "create i" - -mi_gdb_test "-var-create l * l" \ - "\\^done,name=3D\"l\",numchild=3D\"1\",value=3D\"$hex\",type=3D\"long int= \\*\"" \ - "create l" +mi_create_varobj_checked i i int "create i" + +mi_create_varobj_checked l l {long int \*} "create l" =20 # Test: c_variable-2.11 # Desc: create do_locals_tests local in subroutine1 @@ -542,7 +507,7 @@ mi_gdb_test "-var-delete l" \ mi_continue_to do_special_tests =20 mi_gdb_test "-var-create selected_a @ a" \ - {\^done,name=3D"selected_a",numchild=3D"0",value=3D".*",type=3D"int"} \ + {\^done,name=3D"selected_a",numchild=3D"0",value=3D".*",type=3D"int".*} \ "create selected_a" =20 mi_continue_to incr_a Index: gdb.mi/mi2-var-display.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-display.exp,v retrieving revision 1.14 diff -u -p -r1.14 mi2-var-display.exp --- gdb.mi/mi2-var-display.exp 23 Jan 2008 21:05:16 -0000 1.14 +++ gdb.mi/mi2-var-display.exp 26 Mar 2008 13:14:42 -0000 @@ -64,9 +64,7 @@ gdb_expect { =20 # Test: c_variable-6.1 # Desc: create variable bar -mi_gdb_test "-var-create bar * bar" \ - "\\^done,name=3D\"bar\",numchild=3D\"0\",value=3D\".*\",type=3D\"int\"" \ - "create local variable bar" +mi_create_varobj bar bar "create local variable bar" =20 # Test: c_variable-6.2 # Desc: type of variable bar @@ -118,9 +116,7 @@ mi_gdb_test "-var-delete bar" \ =20 # Test: c_variable-6.11 # Desc: create variable foo -mi_gdb_test "-var-create foo * foo" \ - "\\^done,name=3D\"foo\",numchild=3D\"1\",value=3D\".*\",type=3D\"int \\*\= "" \ - "create local variable foo" +mi_create_varobj foo foo "create local variable foo" =20 # Test: c_variable-6.12 # Desc: type of variable foo @@ -178,13 +174,23 @@ mi_gdb_test "-var-delete foo" \ =20 # Test: c_variable-6.21 # Desc: create variable weird and children -mi_gdb_test "-var-create weird * weird" \ - "\\^done,name=3D\"weird\",numchild=3D\"11\",value=3D\".*\",type=3D\"weird= _struct \\*\"" \ - "create local variable weird" - -mi_gdb_test "-var-list-children weird" \ - "\\^done,numchild=3D\"11\",children=3D\\\[child=3D\{name=3D\"weird.intege= r\",exp=3D\"integer\",numchild=3D\"0\",type=3D\"int\"\},child=3D\{name=3D\"= weird.character\",exp=3D\"character\",numchild=3D\"0\",type=3D\"char\"\},ch= ild=3D{name=3D\"weird.char_ptr\",exp=3D\"char_ptr\",numchild=3D\"1\",type= =3D\"char \\*\"\},child=3D\{name=3D\"weird.long_int\",exp=3D\"long_int\",nu= mchild=3D\"0\",type=3D\"long int\"\},child=3D\{name=3D\"weird.int_ptr_ptr\"= ,exp=3D\"int_ptr_ptr\",numchild=3D\"1\",type=3D\"int \\*\\*\"\},child=3D\{n= ame=3D\"weird.long_array\",exp=3D\"long_array\",numchild=3D\"10\",type=3D\"= long int \\\[10\\\]\"\},child=3D\{name=3D\"weird.func_ptr\",exp=3D\"func_pt= r\",numchild=3D\"0\",type=3D\"void \\(\\*\\)\\((void|)\\)\"\},child=3D\{nam= e=3D\"weird.func_ptr_struct\",exp=3D\"func_ptr_struct\",numchild=3D\"0\",ty= pe=3D\"struct _struct_decl \\(\\*\\)\\((int, char \\*, long int|)\\)\"\},ch= ild=3D\{name=3D\"weird.func_ptr_ptr\",exp=3D\"func_ptr_ptr\",numchild=3D\"0= \",type=3D\"struct _struct_decl \\*\\(\\*\\)\\((int, char \\*, long int|)\\= )\"\},child=3D\{name=3D\"weird.u1\",exp=3D\"u1\",numchild=3D\"4\",type=3D\"= union \{\\.\\.\\.\}\"\},child=3D\{name=3D\"weird.s2\",exp=3D\"s2\",numchild= =3D\"4\",type=3D\"struct \{\\.\\.\\.\}\"\}\\\]" \ - "get children local variable weird" +mi_create_varobj weird weird "create local variable 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 10 "long int \\[10\\]"} + {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 local variable weird" =20 =20 # Test: c_variable-6.23 @@ -343,9 +349,7 @@ gdb_expect { =20 # Test: c_variable-7.10 # Desc: create union u -mi_gdb_test "-var-create u * u" \ - "\\^done,name=3D\"u\",numchild=3D\"2\",value=3D\".*\",type=3D\"union name= d_union\"" \ - "create local variable u" +mi_create_varobj u u "create local variable u" =20 # Test: c_variable-7.11 # Desc: value of u @@ -373,15 +377,14 @@ mi_gdb_test "-var-info-num-children u" \ =20 # Test: c_variable-7.15 # Desc: children of u -mi_gdb_test "-var-list-children u" \ - "\\^done,numchild=3D\"2\",children=3D\\\[child=3D\{name=3D\"u.integer\",e= xp=3D\"integer\",numchild=3D\"0\",type=3D\"int\"\},child=3D\{name=3D\"u.cha= r_ptr\",exp=3D\"char_ptr\",numchild=3D\"1\",type=3D\"char \\*\"\}\\\]" \ - "get children of u" +mi_list_varobj_children u { + {u.integer integer 0 int} + {u.char_ptr char_ptr 1 {char \*}} +} "get children of u" =20 # Test: c_variable-7.20 # Desc: create anonu -mi_gdb_test "-var-create anonu * anonu" \ - "\\^done,name=3D\"anonu\",numchild=3D\"3\",value=3D\".*\",type=3D\"union = \{\\.\\.\\.\}\"" \ - "create local variable anonu" +mi_create_varobj anonu anonu "create local variable anonu" =20 # Test: c_variable-7.21 # Desc: value of anonu @@ -409,15 +412,15 @@ mi_gdb_test "-var-info-num-children anon =20 # Test: c_variable-7.25 # Desc: children of anonu -mi_gdb_test "-var-list-children anonu" \ - "\\^done,numchild=3D\"3\",children=3D\\\[child=3D\{name=3D\"anonu.a\",exp= =3D\"a\",numchild=3D\"0\",type=3D\"int\"\},child=3D\{name=3D\"anonu.b\",exp= =3D\"b\",numchild=3D\"0\",type=3D\"char\"\},child=3D\{name=3D\"anonu.c\",ex= p=3D\"c\",numchild=3D\"0\",type=3D\"long int\"\}\\\]" \ - "get children of anonu" +mi_list_varobj_children "anonu" { + {anonu.a a 0 int} + {anonu.b b 0 char} + {anonu.c c 0 "long int"} +} "get children of anonu" =20 # Test: c_variable-7.30 # Desc: create struct s -mi_gdb_test "-var-create s * s" \ - "\\^done,name=3D\"s\",numchild=3D\"6\",value=3D\".*\",type=3D\"struct _si= mple_struct\"" \ - "create local variable s" +mi_create_varobj s s "create local variable s" =20 =20 # Test: c_variable-7.31 @@ -446,16 +449,19 @@ mi_gdb_test "-var-info-num-children s" \ =20 # Test: c_variable-7.35 # Desc: children of s -mi_gdb_test "-var-list-children s" \ - "\\^done,numchild=3D\"6\",children=3D\\\[child=3D\{name=3D\"s.integer\",e= xp=3D\"integer\",numchild=3D\"0\",type=3D\"int\"\},child=3D\{name=3D\"s.uns= igned_integer\",exp=3D\"unsigned_integer\",numchild=3D\"0\",type=3D\"unsign= ed int\"\},child=3D\{name=3D\"s.character\",exp=3D\"character\",numchild=3D= \"0\",type=3D\"char\"\},child=3D\{name=3D\"s.signed_character\",exp=3D\"sig= ned_character\",numchild=3D\"0\",type=3D\"signed char\"\},child=3D\{name=3D= \"s.char_ptr\",exp=3D\"char_ptr\",numchild=3D\"1\",type=3D\"char \\*\"\},ch= ild=3D\{name=3D\"s.array_of_10\",exp=3D\"array_of_10\",numchild=3D\"10\",ty= pe=3D\"int \\\[10\\\]\"\}\\\]" \ - "get children of s" +mi_list_varobj_children s { + {s.integer integer 0 int} + {s.unsigned_integer unsigned_integer 0 "unsigned int"} + {s.character character 0 char} + {s.signed_character signed_character 0 "signed char"} + {s.char_ptr char_ptr 1 {char \*}} + {s.array_of_10 array_of_10 10 {int \[10\]}} +} "get children of s" #} {integer unsigned_integer character signed_character char_ptr array_of_= 10} =20 # Test: c_variable-7.40 # Desc: create anons -mi_gdb_test "-var-create anons * anons" \ - "\\^done,name=3D\"anons\",numchild=3D\"3\",value=3D\".*\",type=3D\"struct= \{\\.\\.\\.\}\"" \ - "create local variable anons" +mi_create_varobj anons anons "create local variable anons" =20 # Test: c_variable-7.41 # Desc: value of anons @@ -483,16 +489,15 @@ mi_gdb_test "-var-info-num-children anon =20 # Test: c_variable-7.45 # Desc: children of anons -mi_gdb_test "-var-list-children anons" \ - "\\^done,numchild=3D\"3\",children=3D\\\[child=3D\{name=3D\"anons.a\",exp= =3D\"a\",numchild=3D\"0\",type=3D\"int\"\},child=3D\{name=3D\"anons.b\",exp= =3D\"b\",numchild=3D\"0\",type=3D\"char\"\},child=3D\{name=3D\"anons.c\",ex= p=3D\"c\",numchild=3D\"0\",type=3D\"long int\"\}\\\]" \ - "get children of anons" - +mi_list_varobj_children anons { + {anons.a a 0 int} + {anons.b b 0 char} + {anons.c c 0 "long int"} +} "get children of anons" =20 # Test: c_variable-7.50 # Desc: create enum e -mi_gdb_test "-var-create e * e" \ - "\\^done,name=3D\"e\",numchild=3D\"0\",value=3D\".*\",type=3D\"enum foo\"= " \ - "create local variable e" +mi_create_varobj e e "create local variable e" =20 setup_xfail "*-*-*" # Test: c_variable-7.51 @@ -528,9 +533,7 @@ mi_gdb_test "-var-list-children e" \ =20 # Test: c_variable-7.60 # Desc: create anone -mi_gdb_test "-var-create anone * anone" \ - "\\^done,name=3D\"anone\",numchild=3D\"0\",value=3D\".*\",type=3D\"enum \= {\\.\\.\\.\}\"" \ - "create local variable anone" +mi_create_varobj anone anone "create local variable anone" =20 setup_xfail "*-*-*" # Test: c_variable-7.61 @@ -610,11 +613,11 @@ gdb_expect { # Test: c_variable-7.81 # Desc: Create variables in different scopes mi_gdb_test "-var-create a1 * a" \ - "\\^done,name=3D\"a1\",numchild=3D\"0\",value=3D\".*\",type=3D\"char\"" \ + "\\^done,name=3D\"a1\",numchild=3D\"0\",value=3D\".*\",type=3D\"char\".*"= \ "create local variable a1" =20 mi_gdb_test "-var-create a2 $fp a" \ - "\\^done,name=3D\"a2\",numchild=3D\"0\",value=3D\".*\",type=3D\"int\"" \ + "\\^done,name=3D\"a2\",numchild=3D\"0\",value=3D\".*\",type=3D\"int\".*" \ "create variable a2 in different scope" =20 #gdbtk_test c_variable-7.81 {create variables in different scopes} { Index: lib/mi-support.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v retrieving revision 1.51 diff -u -p -r1.51 mi-support.exp --- lib/mi-support.exp 29 Jan 2008 19:36:58 -0000 1.51 +++ lib/mi-support.exp 26 Mar 2008 13:14:42 -0000 @@ -1020,6 +1020,14 @@ proc mi_create_varobj { name expression=20 $testname } =20 +# Same as mi_create_varobj, but also checks the reported type +# of the varobj. +proc mi_create_varobj_checked { name expression type testname } { + mi_gdb_test "-var-create $name * $expression" \ + "\\^done,name=3D\"$name\",numchild=3D\"\[0-9\]+\",value=3D\".*\",t= ype=3D\"$type\".*" \ + $testname +} + # Deletes the specified NAME.=20 proc mi_delete_varobj { name testname } { mi_gdb_test "-var-delete $name" \ @@ -1071,10 +1079,19 @@ proc mi_check_varobj_value { name value=20 # - Type # # If inner list has 3 elements, the gdb is expected to output no -# type for a child. +# type for a child and no value. +# +# If the inner list has 4 elements, gdb output is expected to +# have no value. # proc mi_list_varobj_children { varname children testname } { =20 + set options "" + if {[llength $varname] =3D=3D 2} { + set options [lindex $varname 1] + set varname [lindex $varname 0] + } + set numchildren [llength $children] set children_exp {} set whatever "\"\[^\"\]+\"" @@ -1084,22 +1101,42 @@ proc mi_list_varobj_children { varname c set name [lindex $item 0] set exp [lindex $item 1] set numchild [lindex $item 2] - if {[llength $item] =3D=3D 4} { + if {[llength $item] =3D=3D 5} { set type [lindex $item 3] + set value [lindex $item 4] =20 lappend children_exp\ - "child=3D{name=3D\"$name\",exp=3D\"$exp\",numchild=3D\"$nu= mchild\",type=3D\"$type\"}" + "child=3D{name=3D\"$name\",exp=3D\"$exp\",numchild=3D\"$nu= mchild\",value=3D\"$value\",type=3D\"$type\"\(,thread-id=3D\"\[0-9\]+\")?}" + } elseif {[llength $item] =3D=3D 4} { + set type [lindex $item 3] + + lappend children_exp\ + "child=3D{name=3D\"$name\",exp=3D\"$exp\",numchild=3D\"$nu= mchild\",type=3D\"$type\"\(,thread-id=3D\"\[0-9\]+\")?}" } else { lappend children_exp\ - "child=3D{name=3D\"$name\",exp=3D\"$exp\",numchild=3D\"$nu= mchild\"}" + "child=3D{name=3D\"$name\",exp=3D\"$exp\",numchild=3D\"$nu= mchild\"(,thread-id=3D\"\[0-9\]+\")?}" } } set children_exp_j [join $children_exp ","] - set expected "\\^done,numchild=3D\"$numchildren\",children=3D\\\[$chil= dren_exp_j\\\]" + if {$numchildren} { + set expected "\\^done,numchild=3D\".*\",children=3D\\\[$children_e= xp_j.*\\\]" + } { + set expected "\\^done,numchild=3D\"0\"" + } =20 verbose -log "Expecting: $expected" =20 - mi_gdb_test "-var-list-children $varname" $expected $testname + mi_gdb_test "-var-list-children $options $varname" $expected $testname +} + +# Verifies that variable object VARNAME has NUMBER children, +# where each one is named $VARNAME. and has type TYPE. +proc mi_list_array_varobj_children { varname number type testname } { + set t {} + for {set i 0} {$i < $number} {incr i} { + lappend t [list $varname.$i $i 0 $type] + } + mi_list_varobj_children $varname $t $testname } =20 # A list of two-element lists. First element of each list is --Boundary-00=_R/k6HKohLRzVSd8--