From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6306 invoked by alias); 13 Feb 2019 09:24:36 -0000 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 Received: (qmail 1933 invoked by uid 89); 13 Feb 2019 09:24:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy=completion, H*r:user, H*r:may, H*r:forged X-HELO: relay.fit.cvut.cz Received: from relay.fit.cvut.cz (HELO relay.fit.cvut.cz) (147.32.232.237) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Feb 2019 09:24:26 +0000 Received: from imap.fit.cvut.cz (imap.fit.cvut.cz [147.32.232.238]) by relay.fit.cvut.cz (8.15.2/8.15.2) with ESMTPS id x1D9OLsG054575 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Feb 2019 10:24:23 +0100 (CET) (envelope-from jan.vrany@fit.cvut.cz) Received: from sao (02795030.bb.sky.com [2.121.80.48] (may be forged)) (authenticated bits=0 as user vranyj1) by imap.fit.cvut.cz (8.15.2/8.15.2) with ESMTPSA id x1D9OKhL002921 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 13 Feb 2019 10:24:21 +0100 (CET) (envelope-from jan.vrany@fit.cvut.cz) Message-ID: Subject: Re: [PATCH v2 0/2] MI: Add new command -complete From: Jan Vrany To: gdb-patches Cc: Tom Tromey Date: Wed, 13 Feb 2019 09:24:00 -0000 In-Reply-To: <9ddd13d90ac5d77067f5690743149be8a2dcdd1a.camel@fit.cvut.cz> References: <87imynm3ia.fsf@tromey.com> <20190128124101.26243-1-jan.vrany@fit.cvut.cz> <9ddd13d90ac5d77067f5690743149be8a2dcdd1a.camel@fit.cvut.cz> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.4-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-02/txt/msg00170.txt.bz2 Polite ping. Jan On Mon, 2019-02-04 at 10:00 +0000, Jan Vrany wrote: > Polite ping. > > Jan > > On Mon, 2019-01-28 at 12:40 +0000, Jan Vrany wrote: > > This is a rework of previous patch based on Tom's comments. > > > > Another thing worth considering (not done in this version) is to > > have more structured result. Instead of (current version): > > > > -complete "br m" > > =^done,completions=["br main", "br madvise"] > > > > respond with something like (proposed change): > > > > -complete "br m" > > =^done,text="br m",common="a",matches=["in", "dvise"] > > > > The rarionale is that frontend most likely needs these three > > values anyway to implement completion. It can, indeed compute > > them from full list as returned now, but GDB has these values > > already so it would save the frontend doing the same work again. > > > > OTOH, current output is more on par with CLI command output. > > > > What do you think? > > > > Differences v1 -> v2: > > > > * extracted common completion logic to a new helper function > > * implemented MI command using a new mi-specific function rather > > than using CLI implementation. > > > > > > Jan Vrany (2): > > MI: extract command completion logic from complete_command() > > MI: Add new command -complete > > > > gdb/ChangeLog | 14 ++++++ > > gdb/NEWS | 7 +++ > > gdb/cli/cli-cmds.c | 32 +------------ > > gdb/completer.c | 34 +++++++++++++ > > gdb/completer.h | 8 ++++ > > gdb/doc/ChangeLog | 5 ++ > > gdb/doc/gdb.texinfo | 31 ++++++++++++ > > gdb/mi/mi-cmds.c | 2 + > > gdb/mi/mi-cmds.h | 1 + > > gdb/mi/mi-main.c | 44 +++++++++++++++++ > > gdb/testsuite/ChangeLog | 4 ++ > > gdb/testsuite/gdb.mi/mi-complete.exp | 71 ++++++++++++++++++++++++++++ > > 12 files changed, 223 insertions(+), 30 deletions(-) > > create mode 100644 gdb/testsuite/gdb.mi/mi-complete.exp > >