From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11522 invoked by alias); 18 Apr 2019 14:59:34 -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 11508 invoked by uid 89); 18 Apr 2019 14:59:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.2 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy= 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; Thu, 18 Apr 2019 14:59:33 +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 x3IExSIF092982 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 Apr 2019 16:59:29 +0200 (CEST) (envelope-from jan.vrany@fit.cvut.cz) Received: from localhost (02d97c6d.bb.sky.com [2.217.124.109] (may be forged)) (authenticated bits=0 as user vranyj1) by imap.fit.cvut.cz (8.15.2/8.15.2) with ESMTPSA id x3IExRhT054499 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 18 Apr 2019 16:59:28 +0200 (CEST) (envelope-from jan.vrany@fit.cvut.cz) From: Jan Vrany To: gdb-patches@sourceware.org Cc: Jan Vrany Subject: [PATCH v5 0/2] MI: Add new command -complete Date: Thu, 18 Apr 2019 14:59:00 -0000 Message-Id: <20190418145913.5968-1-jan.vrany@fit.cvut.cz> In-Reply-To: <20190418115847.19854-1-jan.vrany@fit.cvut.cz> References: <20190418115847.19854-1-jan.vrany@fit.cvut.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SW-Source: 2019-04/txt/msg00323.txt.bz2 This is a rework of v4 patch based on further Pedro's comments and on Eli's comments Differences v4 -> v5: * removed "\n" from error message * fixed typo and long lines in documentation Differences v3 -> v4: * fixed "few nits" based on Petro's comments * fixed/improved documentation based on Eli's comments Differences v2 -> v3: * to support wildmatching, the command output had to change to provide both, "completion" (what a frontend should complete) and "matches" (a list of possible completions) * and some formatting issues. 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 | 29 +---------- gdb/completer.c | 35 ++++++++++++++ gdb/completer.h | 7 +++ gdb/doc/ChangeLog | 5 ++ gdb/doc/gdb.texinfo | 65 +++++++++++++++++++++++++ gdb/mi/mi-cmds.c | 1 + gdb/mi/mi-cmds.h | 1 + gdb/mi/mi-main.c | 45 +++++++++++++++++ gdb/testsuite/ChangeLog | 5 ++ gdb/testsuite/gdb.mi/mi-complete.cc | 40 ++++++++++++++++ gdb/testsuite/gdb.mi/mi-complete.exp | 72 ++++++++++++++++++++++++++++ 13 files changed, 298 insertions(+), 28 deletions(-) create mode 100644 gdb/testsuite/gdb.mi/mi-complete.cc create mode 100644 gdb/testsuite/gdb.mi/mi-complete.exp -- 2.20.1