From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id B/kMCN9NKGB1AgAAWB0awg (envelope-from ) for ; Sat, 13 Feb 2021 17:08:31 -0500 Received: by simark.ca (Postfix, from userid 112) id 12F1C1EF68; Sat, 13 Feb 2021 17:08:31 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B6F991E789 for ; Sat, 13 Feb 2021 17:08:30 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D766E387084D; Sat, 13 Feb 2021 22:08:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D766E387084D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1613254109; bh=h9Hc9QM/k9S1dp6RxbaG6LuB1kz6KokQ1VKuAB89DP0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=n6tr33gnyhOOKSuC5v1OI11VylcnEqSvLgUffiRnbgQsl4fLL1lLcLM90dNiPqJ9F hVKTvsDCfQv+UDZD9l+wpzYziuv5ryPmVKH0hnnZojUK9CWifj8B95XFf7OG2u6m+K YOQmY5HAHnO0lKETXIkUkogPpQiEH4/kHbede0c0= Received: from beryx.lancelotsix.com (beryx.lancelotsix.com [IPv6:2001:41d0:401:3000::1ab3]) by sourceware.org (Postfix) with ESMTPS id 92BDD3851C0B for ; Sat, 13 Feb 2021 22:08:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 92BDD3851C0B Received: from Plymouth.lan (unknown [IPv6:2a02:390:8443:0:2199:d918:170f:6cbf]) by beryx.lancelotsix.com (Postfix) with ESMTPSA id 42A332E006; Sat, 13 Feb 2021 23:08:25 +0100 (CET) To: gdb-patches@sourceware.org Subject: [PATCH 0/3] Improve the add-inferior completer Date: Sat, 13 Feb 2021 22:07:49 +0000 Message-Id: <20210213220752.32581-1-lsix@lancelotsix.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (beryx.lancelotsix.com [0.0.0.0]); Sat, 13 Feb 2021 23:08:25 +0100 (CET) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Cc: Lancelot SIX Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" This patch series aims at providing a proper completer for the add-inferior command based on the gdb::option framework. The first two commits add support for new option types (zuinteger and filename) and the third implements the completer. The filename completer is based on the one already in gdb/completer.c, but has different behavior when it comes to handling space and quotation characters in file names. For the time being, I propose an independent completer for the gdb::option framework, but if the proposed behavior is desired for ::file_completer, I’d be happy to merge them. I am just unsure whether there are commands that expect to parse file names as completed by the current completer (I do not think so). I also have many warnings by dejagnu because test names contain file names. This adds quite noise but it seems inevitable given how the test names are generated. Is this an issue? All feedback are welcome and will be appreciated. Lancelot SIX (3): gdb::option: Add support for filename option. gdb::option: Add support for zuinteger. Add completer to the add-inferior command gdb/cli/cli-option.c | 277 +++++++++++++++++++++++ gdb/cli/cli-option.h | 41 ++++ gdb/completer.c | 3 + gdb/completer.h | 15 ++ gdb/inferior.c | 123 ++++++---- gdb/maint-test-options.c | 27 ++- gdb/testsuite/gdb.base/completion.exp | 11 + gdb/testsuite/gdb.base/options.exp | 190 +++++++++++++--- gdb/testsuite/lib/completion-support.exp | 1 - 9 files changed, 613 insertions(+), 75 deletions(-) -- 2.29.2