From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20196 invoked by alias); 2 Jul 2009 09:37:37 -0000 Received: (qmail 20185 invoked by uid 22791); 2 Jul 2009 09:37:36 -0000 X-SWARE-Spam-Status: No, hits=0.1 required=5.0 tests=AWL,BAYES_00,BOTNET,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; Thu, 02 Jul 2009 09:37:30 +0000 Received: from totara (unknown [123.255.30.188]) by viper.snap.net.nz (Postfix) with ESMTP id 107EA3D9804; Thu, 2 Jul 2009 21:37:27 +1200 (NZST) Received: by totara (Postfix, from userid 1000) id 1544CC14D; Thu, 2 Jul 2009 21:37:25 +1200 (NZST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19020.32725.55167.391078@totara.tehura.co.nz> Date: Thu, 02 Jul 2009 09:37:00 -0000 To: =?iso-8859-1?q?Andr=E9_P=F6nitz?= Cc: gdb-patches@sourceware.org Subject: Re: [mi] -stack-list-arguments --simple-values In-Reply-To: <200907021005.48239.andre.poenitz@nokia.com> References: <200906301339.30711.vladimir@codesourcery.com> <200907012134.49196.vladimir@codesourcery.com> <629542d40907011044k282ef8dagc1112b4fc6761bff@mail.gmail.com> <200907021005.48239.andre.poenitz@nokia.com> 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-07/txt/msg00059.txt.bz2 > > Isn't every arg a local? Why would an IDE want to display arguments > > and locals differently? > > In KDevelop I added the arguments to the locals. > > -stack-list-locals-and-args would be perfect. > > [Qt Creator does the same btw] So for me, too, yes. > > But in any case it would be nice to be as open as (easily) possible > to other approaches and not to force some design decision on a > frontend. In case of -stack-list-locals-and-args that would be > possible by e.g. adding a kind="arg" / kind="local" flag or such. > > On a related note, can't we have the contents of a > '-stack-list-locals-and-args' in the *stopped message? > > _That_ would save a roundtrip, -stack-list-locals-and-args would > probably not save time at all, at best remove twenty lines of > frontend code... If "added the arguments to the locals" means combining the output of -stack-list-arguments with -stack-list-locals then presumably -stack-list-locals-and-args would save one round trip time. I don't think the extra would be very expensive though. Another, possibly bigger, benefit of introducing such new commands is that the syntax could be more formally defined and they could gradually replace old ones. Currently the output syntax is: `TUPLE ==>' ` "{}" | "{" RESULT ( "," RESULT )* "}" ' `LIST ==>' ` "[]" | "[" VALUE ( "," VALUE )* "]" | "[" RESULT ( "," RESULT )* "]" ' and it would be nice to have: `TUPLE ==>' ` "{}" | "{" RESULT ( "," RESULT )* "}" ' `LIST ==>' ` "[]" | "[" VALUE ( "," VALUE )* "]" ' -stack-list-locals is one of the commands that has "[" RESULT ( "," RESULT )* "]" output. One reason why, in Emacs, we don't fully parse MI output, but use regular expression matching, is because of these inconsistencies. People often lament the poor syntax of MI but it really needs a plan to replace it with something better. However, such a plan would really need a maintainer to lead it and doesn't really work on a Write After Approval basis. -- Nick http://www.inet.net.nz/~nickrob