From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 543 invoked by alias); 17 May 2012 19:07:14 -0000 Received: (qmail 534 invoked by uid 22791); 17 May 2012 19:07:13 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_WEB X-Spam-Check-By: sourceware.org Received: from forward4.mail.yandex.net (HELO forward4.mail.yandex.net) (77.88.46.9) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 May 2012 19:06:58 +0000 Received: from smtp4.mail.yandex.net (smtp4.mail.yandex.net [77.88.46.104]) by forward4.mail.yandex.net (Yandex) with ESMTP id 46AE61BC1F69; Thu, 17 May 2012 23:06:56 +0400 (MSK) Received: from smtp4.mail.yandex.net (localhost [127.0.0.1]) by smtp4.mail.yandex.net (Yandex) with ESMTP id 06C685C0360; Thu, 17 May 2012 23:06:55 +0400 (MSK) Received: from kts.bestnet.kharkov.ua (kts.bestnet.kharkov.ua [80.92.226.138]) by smtp4.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 6ste4pgS-6ttSSsDc; Thu, 17 May 2012 23:06:55 +0400 Message-ID: <4FB54C71.5060205@yandex.ru> Date: Thu, 17 May 2012 19:07:00 -0000 From: xgsa User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120411 Thunderbird/11.0.1 MIME-Version: 1.0 To: Vladimir Prus CC: =?ISO-8859-1?Q?Andr=E9_P=F6nitz?= , Tom Tromey , xgsa , "gdb-patches@sourceware.org" Subject: Re: [patch] Use the string returned by pretty printer for MI varobjs instead of "{...}" References: <305151335125397@web28e.yandex.ru> <87likttnme.fsf@fleche.redhat.com> <20120516010500.GB3321@klara.mpi.htwm.de> <87zk98qijh.fsf@fleche.redhat.com> <20120517121923.GB6350@klara.mpi.htwm.de> <4FB4F5C8.3060701@codesourcery.com> In-Reply-To: <4FB4F5C8.3060701@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2012-05/txt/msg00663.txt.bz2 > I has been quite a while, but I think I was primarily concerned that > GDB would abuse value string on varobj > to show what GDB thinks is the right rendering of data. E.g. while > "[5]" as top-level value might be a reasonable > rendition for an array with 5 children, it's not entirely clear why > GDB's machine interface should take liberties > at telling frontend how to render that. Neither "[", nor 5, nor "]" is > integral part of data, and as soon as > GDB outputs that, frontend has no way of knowing whether this is GDB > trying to be helpful, or really interesting > data that cannot be obtained in any other way. I cannot figure out why the frontend need to know it? I think, it should just output what GDB returns, cause GDB knows better how to visualize the concrete data type due to pretty printers mechanism. Otherwise, the frontend should have something similar to pretty printers that will visualize different types in a comfortable way. In any case if the implemented behavior is not desirable the string() method of pretty printer could be left unimplemented (or return None). It will give the behavior you described above, but could also be extended if necessary. Thanks, Anton