From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108627 invoked by alias); 12 Nov 2018 12:41:37 -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 107815 invoked by uid 89); 12 Nov 2018 12:41:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1034 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Nov 2018 12:41:34 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 406373082AF5; Mon, 12 Nov 2018 12:41:33 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 625F8608F7; Mon, 12 Nov 2018 12:41:32 +0000 (UTC) Subject: Re: [PATCH v2] Add completer for skip numbers To: Simon Marchi , gdb-patches@sourceware.org References: <20181111165446.7069-1-simon.marchi@polymtl.ca> From: Pedro Alves Message-ID: Date: Mon, 12 Nov 2018 12:41:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181111165446.7069-1-simon.marchi@polymtl.ca> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-11/txt/msg00208.txt.bz2 On 11/11/2018 04:54 PM, Simon Marchi wrote: > Add completer to various commands that accept skip numbers: > > - skip enable > - skip disable > - skip delete > - info skip > > These commands also accept ranges, the completer works for that but is > not very smart. It will suggest invalid ranges, for example when doing > "2-" it will suggest "1", which would not result in a valid range. > Also, it will keep suggesting when doing "1-2-", even though it's > an invalid syntax. > > A future idea would be to make a re-usable and well-tested completer for > numbers and ranges. I think it could at least be re-used for breakpoint > and thread numbers (for example with the "enable breakpoints" command). > > gdb/ChangeLog: > > * skip.c (complete_skip_number): New function. > (_initialize_step_skip): Add completers to some skip commands. > > gdb/testsuite/ChangeLog: > > * gdb.base/skip.exp: Add standard_testfile. Add "skip delete" > completer tests. OK. Thanks, Pedro Alves