From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31321 invoked by alias); 2 Jul 2009 10:30:09 -0000 Received: (qmail 31305 invoked by uid 22791); 2 Jul 2009 10:30:08 -0000 X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Jul 2009 10:29:59 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MMJYC-0008JU-N6 for gdb-patches@sources.redhat.com; Thu, 02 Jul 2009 10:29:56 +0000 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 ; Thu, 02 Jul 2009 10:29:56 +0000 Received: from vladimir by h86-62-88-129.ln.rinet.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Jul 2009 10:29:56 +0000 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: [mi] -stack-list-arguments --simple-values Date: Thu, 02 Jul 2009 10:30:00 -0000 Message-ID: References: <200906301339.30711.vladimir@codesourcery.com> <19020.32725.55167.391078@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-07/txt/msg00061.txt.bz2 Nick Roberts wrote: > > > 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. Can you clarify this? KDevelop does use a parser and convert MI into a convenient internal representation, so it is clearly possible in C++. I don't know much about Emacs internals -- is there some problem with parsing methods available there? > 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. FWIW, both the above issue is universally believed to be not good, so patches to introduce MI3 version and switch select commands to "right" syntax appear to be fairly simple. - Volodya