From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7724 invoked by alias); 2 Oct 2009 20:55:23 -0000 Received: (qmail 7714 invoked by uid 22791); 2 Oct 2009 20:55:22 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Oct 2009 20:55:16 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n92KtDsX022216; Fri, 2 Oct 2009 16:55:13 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n92KtCxr022212; Fri, 2 Oct 2009 16:55:12 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n92KtBcd031957; Fri, 2 Oct 2009 16:55:11 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id ABA5437830D; Fri, 2 Oct 2009 14:55:10 -0600 (MDT) From: Tom Tromey To: Matt Rice Cc: gdb-patches@sourceware.org Subject: Re: [patch/rfc] mi interpreter-complete enh req 8058. References: <8ba6bed40910021037q16276bb7w83ec3a5f20e2cbd1@mail.gmail.com> Reply-To: tromey@redhat.com Date: Fri, 02 Oct 2009 20:55:00 -0000 In-Reply-To: <8ba6bed40910021037q16276bb7w83ec3a5f20e2cbd1@mail.gmail.com> (Matt Rice's message of "Fri, 2 Oct 2009 10:37:14 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00068.txt.bz2 >>>>> "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. Matt> it only implements complete_proc for the console interpreter, why Matt> then 'interpreter-complete' if only the console interpreter Matt> implements it? I have no idea. Matt> it has arbitrary limits of 200 completions which has never really been Matt> a part of the gnu credo: Matt> one idea is to introduce a limit argument to the mi command, but that Matt> brings up the idea of bringing in a starting point for resuming Matt> completion, and getting multiple batches Matt> without some form of a continuation it'd have to redo the Matt> completion each batch, it seems difficult/impossible to invalidate Matt> the completion e.g. if loading/completing symbols Matt> so maybe we should forgo the batching but add the limit to the mi command? Yeah, some solution here would be nice to have. This is related to http://sourceware.org/bugzilla/show_bug.cgi?id=9007 I suppose some kind of continuation is not out of the question. Matt> I also notice it doesn't implement the all? argument that he mentioned Matt> in the bug report. If you don't need that, you can ignore it, IMO. Matt> also need to add a -list-features thing... I think it is probably fine not to do that and just let clients catch the error coming from older GDBs. Matt> adding arguments and things obviously would break compatibility with Matt> their gdb, is this an issue? IMO, it is not an issue. But, if it is easy to be compatible, we might as well be. 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 :-) The patch seems reasonable enough. There are some GNU style issues to clean up. And, this would need an update to the manual. Tom