From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17289 invoked by alias); 15 Aug 2011 13:26:07 -0000 Received: (qmail 17277 invoked by uid 22791); 15 Aug 2011 13:26:06 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Aug 2011 13:25:52 +0000 Received: (qmail 25068 invoked from network); 15 Aug 2011 13:25:51 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Aug 2011 13:25:51 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: Python API - nested pretty printers MI implications Date: Mon, 15 Aug 2011 13:26:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-10-generic; KDE/4.7.0; x86_64; ; ) Cc: =?iso-8859-1?q?Andr=E9_P=F6nitz?= References: <20110814171023.19db4f49@ado-gentoo> <201108151436.50248.andre.poenitz@nokia.com> In-Reply-To: <201108151436.50248.andre.poenitz@nokia.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201108151425.48364.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-08/txt/msg00043.txt.bz2 On Monday 15 August 2011 13:36:50, Andr=E9 P=F6nitz wrote: > I am not sure how partial updates on MI varobjs with phony levels=20 > would work at all.=20 >=20 > Imagine a data structure containing a char m[1000000][10], and a=20 > "phony level pretty printer" that displays all the m[i] with m[i][0] =3D= =3D 'A'. > Suppose initially that would be the items m[1] and m[10000], so we=20 > get a display like=20 >=20 > m -- > m[1] "A...." > m[1000] "A...." >=20 > Now the user steps over m[5000][0] =3D 'A'. Assuming there is no dummy > varobj for every _potential_ child, what mechanism would trigger the=20 > varobj's update to produce the display >=20 > m -- > m[1] "A...." > m[5000] "A...." > m[10000] "A...."=20=20=20=20=20 >=20 > eventually? AFAIK, frontends do: -var-update 2 * and that should yield (but doesn't): ^done,changelist=3D[{name=3D"var1.m",value=3D"",in_scope=3D"true",type_chan= ged=3D"false",new_num_children=3D"1",has_more=3D"0",new_children=3D[{name= =3D"var1.m.5000",exp=3D"5000",numchild=3D"1",value=3D"A....",type=3D"foo"}]= }] (gdb) Note new_num_children. This should trigger the frontend re-fetching the children of var1.m. I think the issue here is that dynamic varobj's code doesn't handle new children appearing before existing ones. I got a=20 patch to address that though, needed for supporting varobj's that hide "" children. --=20 Pedro Alves