From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22613 invoked by alias); 9 Jul 2009 17:20:03 -0000 Received: (qmail 22535 invoked by uid 22791); 9 Jul 2009 17:20:02 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Jul 2009 17:19:57 +0000 Received: (qmail 10018 invoked from network); 9 Jul 2009 17:19:55 -0000 Received: from unknown (HELO wind.localnet) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 9 Jul 2009 17:19:55 -0000 From: Vladimir Prus To: Tom Tromey , gdb@sources.redhat.com Subject: Re: Robustifying pretty-printers Date: Thu, 09 Jul 2009 17:20:00 -0000 User-Agent: KMail/1.11.90 (Linux/2.6.24-24-generic; KDE/4.2.90; i686; svn-979530; 2009-06-10) References: <200906131411.34204.vladimir@codesourcery.com> <200906161222.37208.vladimir@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200907092119.55363.vladimir@codesourcery.com> 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: 2009-07/txt/msg00065.txt.bz2 On Wednesday 08 July 2009 Tom Tromey wrote: > >>>>> "Vladimir" == Vladimir Prus writes: > > Vladimir> Exactly, they only limited the number of children sent to > Vladimir> frontend. If we go this route, I think it is better to make > Vladimir> -var-list-children take a couple of parameters to specify > Vladimir> the desired range, with [0, whatever] as default -- as > Vladimir> opposed to the previous approach where this limit should be > Vladimir> set on varobj, not on individual -var-list-children call. > > Just to be clear, do you also want these options on -var-update? > Or should it remember the previous values passed via -var-list-children? I think the most reasonable behavour is to remember the number of fetched children. So, if frontend decided to fetch 20 children once, -var-update should not silently check only 10 of them on. I also think it's best for varobj to remember the number of children requested by frontend, not actually reported. So, if you had 15 children, and fronend first did: -var-list-children v 0 10 and then, maybe in response to user action, did: -var-list-children 10 20 and go 5 new children, and then more children are added, then -var-update will report all existing children between 0 and 20, as opposed to showing just 15. There's also a question how frontend will know that there are more children -- so that it can show "..." in the tree view, or something. The best approach would be for GDB to fetch one children more, and then use emit 'has-more' field in -var-list-children output. The other alternative is for frontend to fetch one more item than it wishes to display -- but such a logic has to be repeated for each frontend. Anyway, this aspect seems independent from others, so I can do it myself after you are done with the code changes. We probably need a way to explicitly reset the 'remembemered' limit on elements, so that frontend is not forced to display 20 elements forever. - Volodya