From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5315 invoked by alias); 15 Oct 2012 11:12:30 -0000 Received: (qmail 5303 invoked by uid 22791); 15 Oct 2012 11:12:29 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from imr4.ericy.com (HELO imr4.ericy.com) (198.24.6.9) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Oct 2012 11:12:24 +0000 Received: from eusaamw0706.eamcs.ericsson.se ([147.117.20.31]) by imr4.ericy.com (8.14.3/8.14.3/Debian-9.1ubuntu1) with ESMTP id q9FBDvAi004242; Mon, 15 Oct 2012 06:13:58 -0500 Received: from EUSAACMS0703.eamcs.ericsson.se ([169.254.1.205]) by eusaamw0706.eamcs.ericsson.se ([147.117.20.31]) with mapi; Mon, 15 Oct 2012 07:12:13 -0400 From: Marc Khouzam To: "'Joel Brobecker'" , "'Andrew Burgess'" CC: "'gdb-patches@sourceware.org'" Date: Mon, 15 Oct 2012 11:12:00 -0000 Subject: RE: [RFC] Change how value is shown for varobjs of type vector. Message-ID: References: <50631DE7.7050702@broadcom.com> <20121014172527.GC3050@adacore.com> In-Reply-To: <20121014172527.GC3050@adacore.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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-10/txt/msg00211.txt.bz2 > -----Original Message----- > From: gdb-patches-owner@sourceware.org=20 > [mailto:gdb-patches-owner@sourceware.org] On Behalf Of Joel Brobecker > Sent: Sunday, October 14, 2012 1:25 PM > To: Andrew Burgess > Cc: gdb-patches@sourceware.org > Subject: Re: [RFC] Change how value is shown for varobjs of=20 > type vector. >=20 > > I have a patch (below) that changes the value field from the current > > "[8]" to "{ 0, 0, 0, 0, 0, 0, 0, 0 }". The varobj still has 8 > > children, and the top level varobj is still not editable,=20 > you have to > > edit through the children. >=20 > I personally do not have a strong objection to this change, but I have > to admit that I am not particularly fond of the idea. I think that > this issue should be handled at the front-end level (Eg. Eclipse), > and in a manor that is general to all arrays. One possible suggestion > would be to have the IDE detect small arrays of integrals, and in > that case display them in a more convenient way right away. But > perhaps it isn't easy, in which case maybe a change in GDB would make > better sense. I just don't like it because it breaks a little bit > the consistency of the value field. I have to admit that Eclipse does not explicitly handle the case of the vector_size __attribute__. Whatever GDB returns to -var-create is shown directly. So, currently, we'll show [8] as the value. However, showing { 0, 0, 0, 0, 0, 0, 0, 0 } would not match our standard behavior. For arrays, we show the address of the array as the unexpanded value, and then show the content=20 in a 'details pane' when the user explicitly selects that array.=20=20 We get the content that you are looking for using -data-evaluate-expression vector ^done,value=3D"{0, 0, 0, 0, 0, 0, 0, 0}" So, I agree with Joel that it would be better to let the front-end deal with this situation (although this is not my call to make :) ) Although I haven't tried, I believe we can figure out this case should be handled like the array case by improving Eclipse's type parser to handle the vector_size __attribute__. Thanks Marc