From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24675 invoked by alias); 21 Sep 2009 05:14:09 -0000 Received: (qmail 24665 invoked by uid 22791); 21 Sep 2009 05:14:08 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Sep 2009 05:14:04 +0000 Received: from list by lo.gmane.org with local (Exim 4.50) id 1MpbCK-00013z-Ct for gdb-patches@sources.redhat.com; Mon, 21 Sep 2009 07:12:24 +0200 Received: from h86-62-88-129.ln.rinet.ru ([86.62.88.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Sep 2009 07:12:24 +0200 Received: from vladimir by h86-62-88-129.ln.rinet.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Sep 2009 07:12:24 +0200 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: [MI] -stack-list-variables Date: Mon, 21 Sep 2009 05:14:00 -0000 Message-ID: References: <200909191412.37692.vladimir@codesourcery.com> <19126.42750.144028.812936@totara.tehura.co.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.9 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: 2009-09/txt/msg00653.txt.bz2 Nick Roberts wrote: > > > How about the format below?: > > > > > > -stack-list-variables --no-values > > > ^done,variables={args=[{name="i"},{name="j"}], > > > locals=[{name="asdf"},{name="m"},{name="zxcv"},{name="qwert"}]} > > > > Why would frontend care about which are locals and which are arguments? I don't > > think I saw any GUI than distinguish between those in variables view. > > CLI treats them as completely different ("info args", "info locals") as MI > did previously (-stack-list-locals, -stack-list-arguments). To the programmer, > I think they are quite different: argument values are passed in, local values > aren't. That's only the "origin" of the values. Inside the function, parameters and locals obey exactly the same rules. > If the front end doesn't care, it can always group these together. I was saying that all frontends I know do not seem to care, therefore it does not seem like we should care. > > Even > > if we decide this information is necessary, would it not be better to present it > > like this: > > > > ^done,variables=[{name="i", arg="1"},{name="asdf"}] > > > > as this format is more extensible in case some other frontend might need > > even more finer details? > > I don't see how this helps. Breaking locals and args down further would require > a new command for backward compatibilty reasons. Why? You can always add new field, e.g. ^done,variables=[{name="i", truly-magic-kind-of-symbol="1"},{name="asdf"}] ? - Volodya