From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31736 invoked by alias); 11 Feb 2010 17:23:09 -0000 Received: (qmail 31728 invoked by uid 22791); 11 Feb 2010 17:23:08 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Feb 2010 17:23:05 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Nfcko-0004ov-Ar for gdb@sources.redhat.com; Thu, 11 Feb 2010 18:23:02 +0100 Received: from h86-62-88-129.ln.rinet.ru ([86.62.88.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Feb 2010 18:23:02 +0100 Received: from vladimir by h86-62-88-129.ln.rinet.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Feb 2010 18:23:02 +0100 To: gdb@sources.redhat.com From: Vladimir Prus Subject: Re: Obtaining number of children of a dynamic varobj Followup-To: gmane.comp.gdb.devel Date: Thu, 11 Feb 2010 17:23:00 -0000 Message-ID: References: <27542787.post@talk.nabble.com> <58596C4646708B4BB990C4483997333001B639E9@usplmvpbe001.ent.rt.verigy.net> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit User-Agent: KNode/4.3.2 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: 2010-02/txt/msg00067.txt.bz2 Elmenthaler, Jens wrote: > Hi, > > Trying to enable the python pretty printers in the Eclipse CDT, a question about the MI API for > varobjs arose. > > If I read the documentation correctly, I should not call -var-list-children without the range of > children, because in general I should assume that the varobj has a huge number of children and > fetching them all is potential too expensive. > > Quite reasonable sofar. Nevertheless, I have the problem that I have to know the number of > children a dynamic varobj has. > > The only way I see to obtain the number of children, however, is to call -var-list-children > without a range specification. I can omit the values to be transferred. Does that have the same > scalability issues, after all it still creates a varobj for each child? [Please do not ask new questions by replying to an unrelated email] Yes, it has the same issues. If you ask GDB about the number of children of a variable, and the variable is uninitialized, GDB might not ever return. - Volodya