From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19784 invoked by alias); 31 Aug 2007 10:13:17 -0000 Received: (qmail 19773 invoked by uid 22791); 31 Aug 2007 10:13:17 -0000 X-Spam-Check-By: sourceware.org Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 31 Aug 2007 10:13:10 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1IR3Ux-0002gJ-2g for gdb-patches@sources.redhat.com; Fri, 31 Aug 2007 14:13:07 +0400 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1IR3Uh-0002fn-VL; Fri, 31 Aug 2007 14:12:52 +0400 From: Vladimir Prus To: Nick Roberts Subject: Re: [mi] -list-features Date: Fri, 31 Aug 2007 10:13:00 -0000 User-Agent: KMail/1.9.6 Cc: Eli Zaretskii , drow@false.org, gdb-patches@sources.redhat.com References: <200708311344.06331.ghost@cs.msu.su> <18135.59157.114705.902937@kahikatea.snap.net.nz> In-Reply-To: <18135.59157.114705.902937@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708311412.50699.ghost@cs.msu.su> 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: 2007-08/txt/msg00552.txt.bz2 On Friday 31 August 2007 14:01:57 Nick Roberts wrote: > > So clearly, > > > > ["feature1","feature2"] > > > > is a valid list and the output I gave is also valid. > > I don't think this syntax is possible using the functions ui_out_field_string, > etc. but if you tried to implement your proposal we would find out for > sure and wouldn't need to debate it. I *did* implemented it, and posted a code patch and here's what I get in my local copy (with two dummy features, for local testing) (gdb) -list-features ^done,features=["feature1","feature2"] > > What you wrote: > > > > ^done,result=[name="feature1",name="feature2"] > > > > is also permitted by the current grammar, but I don't see any possible > > meaning in the "name=". I believe using variable names inside lists > > is old usage, and new commands should not do that. In contrast, tuples are > > in the form: > > > > {name1=value1,name2=value2,....} > > > > and the names are required for tuples. Are you sure you haven't confused tuples > > and lists? > > -stack-list-locals 0 > ^done,locals=[name="aaa",name="zxcv"] > (gdb) This is historical code and gdb manual say this: New GDB/MI commands should only output lists containing values. - Volodya