From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19677 invoked by alias); 2 Dec 2013 09:09:40 -0000 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 Received: (qmail 19658 invoked by uid 89); 2 Dec 2013 09:09:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.8 required=5.0 tests=AWL,BAYES_40,GARBLED_BODY,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Dec 2013 09:09:38 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1VnPVL-0001MY-F8 from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Mon, 02 Dec 2013 01:09:23 -0800 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 2 Dec 2013 01:09:23 -0800 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Mon, 2 Dec 2013 01:09:22 -0800 Message-ID: <529C4DE5.80805@codesourcery.com> Date: Mon, 02 Dec 2013 09:09:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Subject: Re: [RCF 00/11] Visit varobj available children only in MI References: <1385258996-26047-1-git-send-email-yao@codesourcery.com> In-Reply-To: <1385258996-26047-1-git-send-email-yao@codesourcery.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00022.txt.bz2 On 11/24/2013 10:09 AM, Yao Qi wrote: > Hi, > This patch series proposes a feature that GDB is able to visit varobj > available children only, by adding a new option > "--available-children-only" to commands -var-create, > -var-info-num-children and -var-list-children. This patch series was > written by Pedro in one patch. I read the patch three months ago, split > it, add some minor things, and write test cases. I wish I didn't > break anything, including the rationale and the implementation :) > > In each traceframe, with option --available-children-only, the > children of varobj vary, so it behaves like a dynamic varobj. > Since the key of dynamic varobj is the iterator, which can be used to > visit each child. We need a new iterator for varobj with > --available-children-only. > > Current dynamic varobj is python pretty-printer specific, so the > iterator is python specific too. In order to add a new type of iterator, > we have to generalize iterator and de-couple it from python. At > present, iteration is performed against PyObject, but it can > generalized to a name-value pair. That is what patch #1 ~ #3 do. > Note that patch #2 and #3 can be a single commit, but I split it for > review. Ideally, dynamic varobj can be a generic stuff, IMO. > > After the changes in patch #1 ~ #3, we find some code are not > python-specific, so #if HAVE_PYTHON can be removed. It is done by > patch #4. > > Since we think dynamic varobj is no longer python specific, we'd > better rename predicate varobj_pretty_printed_p to varobj_is_dynamic_p, > and use it more widely (done by patch #5 #6). It paves a way for > the next patches to add a new type of dynamic varobj. > > Patch #7 adds the option --available-children-only in MI code, patch > #8 adds the corresponding iterator, and patch #9 updates varobj children > when traceframe is changed. These three should be in one commit. > Note that there is at most one iterator can be applied to one varobj. > If pretty-printer is installed and option --available-children-only > is used, GDB has to return one iterator, and we choose iterator > for available-children-only. > > Patch #10 and #11 are about test cases. Patch #10 is to teach > testsuite to match dynamic="1", and patch #11 is the test case for > option --available-children-only. > > I don't include NEWS and doc patch in this series, because we'd like > to discuss on "whether we can call varobj with --available-children-only > a dynamic varobj". The result affects the doc, IMO. Although we > implemented varobj with --available-children-only as a dynamic varobj, > I am not sure we can do the same in doc, which is user visible. > > The whole series is tested on x86_64-linux. Ping. https://sourceware.org/ml/gdb-patches/2013-11/msg00739.html -- Yao (齐尧)