From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10638 invoked by alias); 10 Nov 2006 16:34:03 -0000 Received: (qmail 10620 invoked by uid 22791); 10 Nov 2006 16:34:02 -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 16:33:52 +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 E785B3D8F0B; Sat, 11 Nov 2006 05:34:03 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 6ABDDBE3A4; Sat, 11 Nov 2006 05:29:59 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17748.43269.740800.782628@kahikatea.snap.net.nz> Date: Fri, 10 Nov 2006 16:34:00 -0000 To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: -var-show-attributes response syntax In-Reply-To: <200611101655.32843.vladimir@codesourcery.com> References: <200611101655.32843.vladimir@codesourcery.com> 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/msg00055.txt.bz2 Vladimir Prus writes: > > Hello! > > Here's the docs for -var-show-attributes MI command: > > Synopsis > -var-show-attributes name > > List attributes of the specified variable object name: > status=attr [ ( ,attr )* ] > where attr is { { editable | noneditable } | TBD }. > > What is the reason for using "non" instead of "attribute_name=attribute_value" > syntax? The above assumes all attributes are boolean, which is not very > extensible. I think the above means output may be something like: ^done,attr={"editable","yellow","big"} (Perhaps { a | b } should be documented in "Notation and Terminology".) Currently it appears that attr="noneditable" for constant types and attr="editable" otherwise. I don't know what other attributes the authors had in mind (long?, volatile?, local?, static?). > How about changing the above to "editable=0/1"? I see no advantage in restricting the output but I've not used this command. How do you want to use it? > 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? -- Nick http://www.inet.net.nz/~nickrob