From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6886 invoked by alias); 6 Aug 2009 21:02:35 -0000 Received: (qmail 6263 invoked by uid 22791); 6 Aug 2009 21:02:34 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 06 Aug 2009 21:02:27 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n76L2PaW011037 for ; Thu, 6 Aug 2009 17:02:25 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n76L2P5m015069 for ; Thu, 6 Aug 2009 17:02:25 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n76L2Ogj002193; Thu, 6 Aug 2009 17:02:25 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 4061E37858F; Thu, 6 Aug 2009 15:02:24 -0600 (MDT) To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: MI & pretty-printing References: <200907132142.18043.vladimir@codesourcery.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Thu, 06 Aug 2009 21:02:00 -0000 In-Reply-To: <200907132142.18043.vladimir@codesourcery.com> (Vladimir Prus's message of "Mon\, 13 Jul 2009 21\:42\:17 +0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-08/txt/msg00046.txt.bz2 >>>>> "Volodya" == Vladimir Prus writes: Volodya> On IRC, Tom and I talked about best way to support Python Volodya> pretty-printing with MI. Here's my attempt at summarizing. I finally finished the first draft of this. I pushed it to the archer-tromey-python branch today. Please give it a try; if it is all looking ok I will extract it and push it into CVS. Volodya> -enable-pretty-printing [0|1] I omitted the argument in my implementation. I didn't see a benefit to letting MI clients disable pretty-printing globally. They can do it per-varobj, or simply not send this command in the first place. (If we did allow this, then we'd have to define what it meant for existing varobjs with printers installed.) Volodya> -var-list-children varobj [low] [hi] Volodya> -var-set-update-range varobj low hi I implemented these verbatim. There is now an optional has_more attribute on varobj output; it is a boolean which is "1" if there seem to be children past the last requested child. The "numchild" attribute is now a bit funny. It can't tell the actual number of children, only the number you've requested. It may be smaller than the range you requested. The user has to pay attention to this, because it is the only way to notice that children were deleted (for -var-update, this will show up in new_num_children). When doing a -var-update, a dynamic varobj may report "new_children". This is a list of any new children added during this update. New children can only be added at the end of the update range (changes to existing elements are reported as changed varobjs). I haven't documented all these details yet. I'll do that soon. (FWIW, -var-update seems under-documented in general.) Tom