From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1037 invoked by alias); 14 Jul 2009 01:55:00 -0000 Received: (qmail 1023 invoked by uid 22791); 14 Jul 2009 01:54:59 -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; Tue, 14 Jul 2009 01:54:53 +0000 Received: from totara (16.60.255.123.dynamic.snap.net.nz [123.255.60.16]) by viper.snap.net.nz (Postfix) with ESMTP id CB3F13D9E54; Tue, 14 Jul 2009 13:54:50 +1200 (NZST) Received: by totara (Postfix, from userid 1000) id 7F5F3C159; Tue, 14 Jul 2009 13:54:49 +1200 (NZST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19035.58729.493725.846907@totara.tehura.co.nz> Date: Tue, 14 Jul 2009 01:55:00 -0000 To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: MI & pretty-printing In-Reply-To: <200907132142.18043.vladimir@codesourcery.com> References: <200907132142.18043.vladimir@codesourcery.com> From: nickrob@snap.net.nz (Nick Roberts) 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-07/txt/msg00092.txt.bz2 Vladimir Prus writes: > > On IRC, Tom and I talked about best way to support Python > pretty-printing with MI. Here's my attempt at summarizing. > > 1. It does not seem like existing frontends can make use of > pretty-printing automatically. If frontend tries to list > children of an invalid value, GDB may just hang. If GDB > automatically limits the number of children, then existing > frontends will not be able to see the children beyond this > limit (or have GUI for that). Therefore, it is suggested than > a new MI command is used to explicitly enable pretty-printing > in MI, say > > -enable-pretty-printing [0|1] > > 2. The FE may request a specific range of children by passing > low and high boundary: > > -var-list-children varobj [low] [hi] When I submitted patches for similar functionality in April/May of last year, I proposed a third parameter, stride, or step size, to sample a large array. ISTR Solaris dbx and Totalviewallow(ed) allow printing array slices in this way. first patch: http://sourceware.org/ml/gdb-patches/2008-04/msg00493.html final patch: http://sourceware.org/ml/gdb-patches/2008-05/msg00328.html > If no range is specified, an attempt to report all children is > made, be what may. > > 3. A varobj keeps a range of children to fetch on -var-update, and > a new command is added to set that range, say, > > -var-set-update-range varobj low hi I think -var-set-update-range would be a useful addition. -- Nick http://www.inet.net.nz/~nickrob