From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15854 invoked by alias); 29 Jun 2009 07:13:27 -0000 Received: (qmail 15837 invoked by uid 22791); 29 Jun 2009 07:13:24 -0000 X-SWARE-Spam-Status: No, hits=0.1 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from qw-out-1920.google.com (HELO qw-out-1920.google.com) (74.125.92.148) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Jun 2009 07:13:18 +0000 Received: by qw-out-1920.google.com with SMTP id 5so1878167qwf.24 for ; Mon, 29 Jun 2009 00:13:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.97.13 with SMTP id j13mr1409410vcn.35.1246259596598; Mon, 29 Jun 2009 00:13:16 -0700 (PDT) In-Reply-To: References: <629542d40906281203o3601025at573704e36ee80565@mail.gmail.com> <629542d40906281256s28c98c23o387cb8721f3e6b3c@mail.gmail.com> Date: Mon, 29 Jun 2009 07:13:00 -0000 Message-ID: <629542d40906290013p4d161201l2da51fc4317052f2@mail.gmail.com> Subject: Re: -stack-list-locals and children From: Niko Sams To: gdb Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 2009-06/txt/msg00280.txt.bz2 On Mon, Jun 29, 2009 at 07:25, Vladimir Prus wrote: > Niko Sams wrote: > >> On Sun, Jun 28, 2009 at 21:31, Vladimir Prus wrote: >>> Niko Sams wrote: >>> >>>> Hi, >>>> >>>> -stack-list-locals doesn't return an numchild element. How can the IDE >>>> know if a local >>>> is has children? >>>> >>>> If there are children, they are listed in value: >>>> ^done,locals=[{name="list",value="QList = {[0] = \"hello\"}"}] >>>> >>>> Is it a good idea to parse the value with an regular expression to >>>> find out if there are children? >>>> >>>> Or is there a better way to get numchild? >>> >>> I think the right approach is a command that creates and returns varobjs >>> for locals. >> I thought a large number of -var-create commands could be omitted when using >> the value we already get. >> Basic tests showed me that -var-create is relatively slow for large lists. > > How slow and how did you measure this? I would not expect variable objects to > be considerably slower than printing the value in any other way. I measured using -enable-timings. I did -var-create for a QStringList with 1000 items, took 0.6sec. Niko