From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22403 invoked by alias); 10 Nov 2006 20:47:51 -0000 Received: (qmail 22388 invoked by uid 22791); 10 Nov 2006 20:47:50 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 10 Nov 2006 20:47:40 +0000 Received: from kahikatea.snap.net.nz (p202-124-120-183.snap.net.nz [202.124.120.183]) by viper.snap.net.nz (Postfix) with ESMTP id 838B23D82D9; Sat, 11 Nov 2006 09:47:48 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 8C962BE439; Sat, 11 Nov 2006 09:43:42 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17748.58492.703620.633216@kahikatea.snap.net.nz> Date: Fri, 10 Nov 2006 20:47:00 -0000 To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: -var-show-attributes response syntax In-Reply-To: References: <200611101655.32843.vladimir@codesourcery.com> <17748.43269.740800.782628@kahikatea.snap.net.nz> X-Mailer: VM 7.19 under Emacs 22.0.90.11 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00062.txt.bz2 > > I see no advantage in restricting the output but I've not used this > > command. How do you want to use it? > > I want to add a new attribute there, actually, and I'd prefer to use more > regular name=value syntax. That's still a bit vague. You say: How about changing the above to "editable=0/1"? Are you suggesting ^done,attr="editable=0", ^done,attr="editable=1" or ^done,editable="0", ^done,editable="1" Either case still requires the front end to do some string manipulation/comparison. Can you state precisely how you would change the format and precisely what the benefit would be? > > > This sounds like > > > breaking > > > backward compatibility, but probably is not, because "editable" is > > > broken itself: > > > > > > -var-create C * 1+1 > > > ^done,name="C",numchild="0",type="long" > > > (gdb) > > > -var-show-attributes C > > > ^done,attr="editable" > > > (gdb) > > > > Why do you think this is broken? > > Because you can't assign the value to "1+1" -- it's not lvalue. And trying > to do so will result in error from gdb. I see, I missed that. In fact it my example was also wrong too, constants in C appear to be editable. Noneditables appear to be arrays, structures, unions etc. However I think this a separate issue to changing the syntax. -- Nick http://www.inet.net.nz/~nickrob