From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32554 invoked by alias); 23 Jan 2004 17:05:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 32533 invoked from network); 23 Jan 2004 17:05:10 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 23 Jan 2004 17:05:10 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1Ak4k1-00088x-VF; Fri, 23 Jan 2004 12:05:09 -0500 Date: Fri, 23 Jan 2004 17:05:00 -0000 From: Daniel Jacobowitz To: Nick Roberts , gdb-patches@sources.redhat.com Subject: Re: {commit: gdb/mi] -stack-list-locals and -var-list-children Message-ID: <20040123170509.GA31156@nevyn.them.org> Mail-Followup-To: Nick Roberts , gdb-patches@sources.redhat.com References: <16396.33276.280356.511030@nick.uklinux.net> <20040120054932.GB23548@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20040120054932.GB23548@nevyn.them.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-01/txt/msg00627.txt.bz2 On Tue, Jan 20, 2004 at 12:49:32AM -0500, Daniel Jacobowitz wrote: > On Tue, Jan 20, 2004 at 01:18:52AM +0000, Nick Roberts wrote: > >=20 > > I've comitted the patches below. Testcases don't work for me but I've k= ept the > > status quo so they should work for others. Diff's have been made with E= macs > > backup files - sorry, should have made the patches before committing, d= one > > off-line - 64k modem, family to feed etc. I hope they work... Well they > > compile anyway. >=20 > No, you've added a failing testcase: >=20 > -var-list-children --all-values struct_declarations.long_array > ^done,numchild=3D"10",children=3D[child=3D{name=3D"struct_declarations.lo= ng_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",numchi= ld=3D"0",value=3D"2345" > ,type=3D"long > int"},child=3D{name=3D"struct_declarations.long_array.2",exp=3D"2",numchi= ld=3D"0",value=3D"3456",type=3D > "long > int"},child=3D{name=3D"struct_declarations.long_array.3",exp=3D"3",numchi= ld=3D"0",value=3D"28281",type=3D"long > int"},child=3D{name=3D"struct_declarations.long_array.4",exp=3D"4",numch= ild=3D"0",value=3D"0",type=3D"long > int"},ch > ild=3D{name=3D"struct_declarations.long_array.5",exp=3D"5",numchild=3D"0"= ,value=3D"0",type=3D"long > int"},child=3D{name > =3D"struct_declarations.long_array.6",exp=3D"6",numchild=3D"0",value=3D"0= ",type=3D"long > int"},child=3D{name=3D"struct_ > declarations.long_array.7",exp=3D"7",numchild=3D"0",value=3D"0",type=3D"l= ong > int"},child=3D{name=3D"struct_declarati > ons.long_array.8",exp=3D"8",numchild=3D"0",value=3D"0",type=3D"long > int"},child=3D{name=3D"struct_declarations.long_ > array.9",exp=3D"9",numchild=3D"0",value=3D"0",type=3D"long int"}] > (gdb)=20 > FAIL: gdb.mi/mi-var-child.exp: listing of names and values of children >=20 > I'll look at the problem in the morning. I believe that this is a problem in the patch, not in the testcase. If I step to the same PC in a non-MI GDB, the values are correct, but above only the first few are initialized. If I execute this silly little command sequence: b do_children_tests b 208 run -var-create struct_declarations * struct_declarations -var-list-children struct_declarations -var-list-children --all-values struct_declarations.long_array continue -var-list-children --all-values struct_declarations.long_array print struct_declarations.long_array I get this output: ~"GNU gdb 2004-01-23-cvs\n" ~"Copyright 2004 Free Software Foundation, Inc.\n" ~"GDB is free software, covered by the GNU General Public License, and you = are\n" ~"welcome to change it and/or distribute copies of it under certain conditi= ons.\n" ~"Type \"show copying\" to see the conditions.\n" ~"There is absolutely no warranty for GDB. Type \"show warranty\" for deta= ils.\n" ~"This GDB was configured as \"i686-pc-linux-gnu\"..." ~"Using host libthread_db library \"/lib/tls/i686/cmov/libthread_db.so.1\".= \n" ~"\n" (gdb)=20 &"b do_children_tests\n" ^done (gdb)=20 &"b 208\n" ^done (gdb)=20 &"run\n" ^done,reason=3D"breakpoint-hit",bkptno=3D"1",thread-id=3D"0",frame=3D{addr= =3D"0x080484d0",func=3D"do_children_tests",args=3D[],file=3D"/opt/src/gdb/s= rc/gdb/testsuite/gdb.mi/var-cmd.c",line=3D"190"} (gdb)=20 ^done,name=3D"struct_declarations",numchild=3D"11",type=3D"struct _struct_d= ecl" (gdb)=20 ^done,numchild=3D"11",children=3D[child=3D{name=3D"struct_declarations.inte= ger",exp=3D"integer",numchild=3D"0",type=3D"int"},child=3D{name=3D"struct_d= eclarations.character",exp=3D"character",numchild=3D"0",type=3D"char"},chil= d=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",type=3D"long int"},child=3D{name=3D"struct_declaration= s.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.func_ptr",exp= =3D"func_ptr",numchild=3D"0",type=3D"void (*)(void)"},child=3D{name=3D"stru= ct_declarations.func_ptr_struct",exp=3D"func_ptr_struct",numchild=3D"0",typ= e=3D"struct _struct_decl (*)(int, char *, long int)"},child=3D{name=3D"stru= ct_declarations.func_ptr_ptr",exp=3D"func_ptr_ptr",numchild=3D"0",type=3D"s= truct _struct_decl *(*)(int, char *, long int)"},child=3D{name=3D"struct_de= clarations.u1",exp=3D"u1",numchild=3D"4",type=3D"union {...}"},child=3D{nam= e=3D"struct_declarations.s2",exp=3D"s2",numchild=3D"4",type=3D"struct {...}= "}] (gdb)=20 ^done,numchild=3D"10",children=3D[child=3D{name=3D"struct_declarations.long= _array.0",exp=3D"0",numchild=3D"0",value=3D"0",type=3D"long int"},child=3D{= name=3D"struct_declarations.long_array.1",exp=3D"1",numchild=3D"0",value=3D= "0",type=3D"long int"},child=3D{name=3D"struct_declarations.long_array.2",e= xp=3D"2",numchild=3D"0",value=3D"1986358784",type=3D"long int"},child=3D{na= me=3D"struct_declarations.long_array.3",exp=3D"3",numchild=3D"0",value=3D"2= 8281",type=3D"long int"},child=3D{name=3D"struct_declarations.long_array.4"= ,exp=3D"4",numchild=3D"0",value=3D"0",type=3D"long int"},child=3D{name=3D"s= truct_declarations.long_array.5",exp=3D"5",numchild=3D"0",value=3D"0",type= =3D"long int"},child=3D{name=3D"struct_declarations.long_array.6",exp=3D"6"= ,numchild=3D"0",value=3D"0",type=3D"long int"},child=3D{name=3D"struct_decl= arations.long_array.7",exp=3D"7",numchild=3D"0",value=3D"0",type=3D"long in= t"},child=3D{name=3D"struct_declarations.long_array.8",exp=3D"8",numchild= =3D"0",value=3D"0",type=3D"long int"},child=3D{name=3D"struct_declarations.= long_array.9",exp=3D"9",numchild=3D"0",value=3D"0",type=3D"long int"}] (gdb)=20 &"continue\n" ^done,reason=3D"breakpoint-hit",bkptno=3D"2",thread-id=3D"0",frame=3D{addr= =3D"0x08048573",func=3D"do_children_tests",args=3D[],file=3D"/opt/src/gdb/s= rc/gdb/testsuite/gdb.mi/var-cmd.c",line=3D"208"} (gdb)=20 ^done,numchild=3D"10",children=3D[child=3D{name=3D"struct_declarations.long= _array.0",exp=3D"0",numchild=3D"0",value=3D"0",type=3D"long int"},child=3D{= name=3D"struct_declarations.long_array.1",exp=3D"1",numchild=3D"0",value=3D= "0",type=3D"long int"},child=3D{name=3D"struct_declarations.long_array.2",e= xp=3D"2",numchild=3D"0",value=3D"1986358784",type=3D"long int"},child=3D{na= me=3D"struct_declarations.long_array.3",exp=3D"3",numchild=3D"0",value=3D"2= 8281",type=3D"long int"},child=3D{name=3D"struct_declarations.long_array.4"= ,exp=3D"4",numchild=3D"0",value=3D"0",type=3D"long int"},child=3D{name=3D"s= truct_declarations.long_array.5",exp=3D"5",numchild=3D"0",value=3D"0",type= =3D"long int"},child=3D{name=3D"struct_declarations.long_array.6",exp=3D"6"= ,numchild=3D"0",value=3D"0",type=3D"long int"},child=3D{name=3D"struct_decl= arations.long_array.7",exp=3D"7",numchild=3D"0",value=3D"0",type=3D"long in= t"},child=3D{name=3D"struct_declarations.long_array.8",exp=3D"8",numchild= =3D"0",value=3D"0",type=3D"long int"},child=3D{name=3D"struct_declarations.= long_array.9",exp=3D"9",numchild=3D"0",value=3D"0",type=3D"long int"}] (gdb)=20 &"print struct_declarations.long_array\n" ~"$1 =3D {" ~"1234, " ~"2345, " ~"3456, " ~"4567, " ~"5678, " ~"6789, " ~"7890, " ~"8901, " ~"9012, " ~"1234}\n" ^done (gdb)=20 Note that the varobj is out of date. --=20 Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer