From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20385 invoked by alias); 19 Sep 2009 22:41:04 -0000 Received: (qmail 20377 invoked by uid 22791); 19 Sep 2009 22:41:04 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.25) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 19 Sep 2009 22:40:59 +0000 Received: from totara (200.31.255.123.dynamic.snap.net.nz [123.255.31.200]) by viper.snap.net.nz (Postfix) with ESMTP id 600193DBB48; Sun, 20 Sep 2009 10:40:51 +1200 (NZST) Received: by totara (Postfix, from userid 1000) id 5DE89C164; Sun, 20 Sep 2009 10:40:50 +1200 (NZST) To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re:[MI] -stack-list-variables In-Reply-To: <200909191412.37692.vladimir@codesourcery.com> References: <200909191412.37692.vladimir@codesourcery.com> Message-Id: <20090919224050.5DE89C164@totara> Date: Sat, 19 Sep 2009 22:41:00 -0000 From: nickrob@snap.net.nz (Nick Roberts) 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/msg00639.txt.bz2 > ...The new command is called -stack-list-variables, > and it's checked in into CVS HEAD. I don't like this patch/commit for a couple of reasons. One reason I proposed such a command was to move away from the loose syntax that MI uses. In particular to move away from: `LIST ==>' ` "[]" | "[" VALUE ( "," VALUE )* "]" | "[" RESULT ( "," RESULT )* "]" ' to `LIST ==>' ` "[]" | "[" VALUE ( "," VALUE )* "]" ' to provide a more JSON-like syntax. As with -stack-list-locals, the new output can give something like: -stack-list-variables --no-values ^done,variables=[name="i",name="j",name="asdf",name="m",name="zxcv",name="qwert"] but to keep JSON-like syntax, this needs to be: -stack-list-variables --no-values ^done,variables=[{name="i"},{name="j"},{name="asdf"},{name="m"},{name="zxcv"},{name="qwert"}] which leads to my second point: Which `variables' are the arguments and which are locals? Arguments might be a kind of local but they're not identical. 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"}]} -- Nick http://www.inet.net.nz/~nickrob