From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10442 invoked by alias); 14 Sep 2009 23:48:27 -0000 Received: (qmail 10420 invoked by uid 22791); 14 Sep 2009 23:48:25 -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; Mon, 14 Sep 2009 23:48:21 +0000 Received: from totara (214.63.255.123.dynamic.snap.net.nz [123.255.63.214]) by viper.snap.net.nz (Postfix) with ESMTP id ADF842F411F; Tue, 15 Sep 2009 11:48:18 +1200 (NZST) Received: by totara (Postfix, from userid 1000) id 7D092C164; Tue, 15 Sep 2009 11:48:17 +1200 (NZST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19118.54846.814189.465863@totara.tehura.co.nz> Date: Mon, 14 Sep 2009 23:48:00 -0000 To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: Patch: implement new dynamic varobj spec In-Reply-To: References: <19116.23500.574462.227048@totara.tehura.co.nz> 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/msg00467.txt.bz2 > Nick> In fact it would also make things easier if the "exp" field of > Nick> -var-list-children was just a number and this would make it > Nick> consistent with ordinary arrays. > > The children might not actually represent an array. For example, they > may conceptually be fields of a struct. > > Nick> + /* Strip square brackets from string. */ > Nick> + len = strlen (py_name); > Nick> + name = strndup (py_name + 1, len - 2); > > There is nothing guaranteeing square brackets about the name. The name > is determined wholly by the Python pretty-printer, which can return > anything at all. OK. As it came out of PyArg_ParseTuple, I had presumed it was part of Python syntax. > I would prefer not to change this. I think front ends simply have to > treat the child name as an arbitrary string. They can use the display > hint to decide how and if to display the name. For collections, it would seem useful to have some kind of index number. -- Nick http://www.inet.net.nz/~nickrob