From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18713 invoked by alias); 11 Sep 2009 05:41:35 -0000 Received: (qmail 18464 invoked by uid 22791); 11 Sep 2009 05:41:34 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.25) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Sep 2009 05:41:29 +0000 Received: from totara (34.29.255.123.dynamic.snap.net.nz [123.255.29.34]) by viper.snap.net.nz (Postfix) with ESMTP id 1C86B3DB3F7; Fri, 11 Sep 2009 17:41:26 +1200 (NZST) Received: by totara (Postfix, from userid 1000) id 63D4CC164; Fri, 11 Sep 2009 17:41:24 +1200 (NZST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19113.58116.381538.294631@totara.tehura.co.nz> Date: Fri, 11 Sep 2009 05:41:00 -0000 To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Patch: implement new dynamic varobj spec In-Reply-To: References: From: nickrob@snap.net.nz (Nick Roberts) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00299.txt.bz2 Tom Tromey writes: > This is the long-awaited dynamic varobj patch. > It implements the spec as described by Vladimir: > > http://sourceware.org/ml/gdb/2009-07/msg00088.html It's a big patch. Dynamic variable objects seem to behave differently to the current ones: 1) Children are reported (and presumably created) in var-update even though only a root variable object may have been created, i.e., not -var-list-children has been invoked. 2) -var-update seems to list changes to children of dynamic objects in reverse numerical order. Does -var-set-update-range only work for dynamic variable objects - the documentation doesn't say but I couldn't get it to work with current ones. With dynamic variable objects I could restrict the range but it didn't seem to match up (from seem to be ignored). The new FROM TO arguments for -var-list-children work with current variable objects but it seems that GDB just restricts what it prints but stores the whole vector which doesn't seem to save memory. Would it not be better to create children in the range specified since the array might be large and the front end only needs the values it displays. Likewise with -var-set-update-range: does GDB track all changes and just report a restricted set, or restrict what it tracks? I have a few thoughts about the documentation: The field `in_scope' is already described with three possible values. It's described again with just two. The field `displayhint' seems very useful with -var-create but does it serve any purpose when output with -var-update? The field `has_more' seems to be overloaded depending on whether its output from -var-create, -var-list-children or -var-update. Existing documentation uses @var for field names, while new uses @samp. I find varobj.c hard to read and some of what I say might be wrong but hopefully there's more signal than noise. -- Nick http://www.inet.net.nz/~nickrob