From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7722 invoked by alias); 2 Oct 2009 23:10:16 -0000 Received: (qmail 7710 invoked by uid 22791); 2 Oct 2009 23:10:15 -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 mx.southnet.co.nz (HELO viper.snap.net.nz) (202.37.101.20) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Oct 2009 23:10:11 +0000 Received: from totara (172.28.255.123.dynamic.snap.net.nz [123.255.28.172]) by viper.snap.net.nz (Postfix) with ESMTP id 41DD33DA7E4; Sat, 3 Oct 2009 12:10:08 +1300 (NZDT) Received: by totara (Postfix, from userid 1000) id 3BB45C167; Sat, 3 Oct 2009 12:10:07 +1300 (NZDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19142.34895.136190.624637@totara.tehura.co.nz> Date: Fri, 02 Oct 2009 23:10:00 -0000 To: tromey@redhat.com Cc: Matt Rice , gdb-patches@sourceware.org Subject: Re: [patch/rfc] mi interpreter-complete enh req 8058. In-Reply-To: References: <8ba6bed40910021037q16276bb7w83ec3a5f20e2cbd1@mail.gmail.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-10/txt/msg00081.txt.bz2 Tom Tromey writes: > >>>>> "Matt" == Matt Rice writes: > > Matt> Attached is a patch i've ported from Apple's gdb... > Matt> it implements a tab-completion like function for MI > Matt> http://sourceware.org/bugzilla/show_bug.cgi?id=8058 > Matt> I figured I would post a basic port of the patch for discussion, > Matt> before doing to much to it. > > Thanks. PR 8058 goes back to 2003. I don't see the need for MI to duplicate all of the CLI functionality. Emacs just uses the CLI command "complete" which is clearly just intended for front end use: complete b ma &"complete b ma\n" ~"b main\n" ~"b malloc\n" ~"b malloc@plt\n" ^done The lisp function, gud-gdb-complete-command. is bound to TAB to it works in the GUD buffer (Emacs' console) just as it does on the command line. > ... > Matt> -interpreter-complete console "b ma" > Matt> ^done,completions=[c="main",c="malloc",c="malloc@plt"] > > It is weird to see all those useless "c=" strings in there :-) Well, if they are going to be present, could we please stick to the syntax suggested in the manual: `TUPLE ==>' ` "{}" | "{" RESULT ( "," RESULT )* "}" ' and * New GDB/MI commands should only output LISTS containing VALUES. So either ^done,completions={c="main",c="malloc",c="malloc@plt"} or ^done,completions=["main","malloc","malloc@plt"] -- Nick http://users.snap.net.nz/~nickrob