From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11886 invoked by alias); 15 May 2012 16:28:49 -0000 Received: (qmail 11871 invoked by uid 22791); 15 May 2012 16:28:45 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_XG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 May 2012 16:28:31 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4FGSR1Q009393 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 15 May 2012 12:28:27 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q4FGSPZC012916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 15 May 2012 12:28:26 -0400 From: Tom Tromey To: xgsa Cc: "gdb-patches\@sourceware.org" , Vladimir_Prus@mentor.com Subject: Re: [patch] Use the string returned by pretty printer for MI varobjs instead of "{...}" References: <305151335125397@web28e.yandex.ru> Date: Tue, 15 May 2012 16:28:00 -0000 In-Reply-To: <305151335125397@web28e.yandex.ru> (xgsa@yandex.ua's message of "Mon, 23 Apr 2012 00:09:57 +0400") Message-ID: <87likttnme.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 2012-05/txt/msg00576.txt.bz2 >>>>> "Anton" == xgsa writes: Anton> The documentation for -var-create says that "for a varobj whose type Anton> is some sort of aggregate (e.g., a struct), or for a dynamic varobj, Anton> the 'value' attribute will not be interesting". That's not true, as Anton> dynamic varobj could also have no children (so its value will be not Anton> "{...}" and will be interesting). However I think the string value of Anton> varobj that has pretty printer installed should always be returned via Anton> MI. It could contain such a useful information as container length or Anton> reference count for smart pointers. Moreover, it seems that this Anton> information cannot be accessed via MI in another way. This patch Anton> contains the proposed fix, documentation and test suite update. The patch itself looks fine, but I am not sure whether it should go in. My recollection is that the code originally worked this way, but Vladimir asked for the "{...}" behavior specifically. I've CC'd him for comments. I am in favor of this change, as I never understood the current behavior; so in the absence of comments I will approve it. I'm sorry about the delay. Tom