From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99852 invoked by alias); 28 Jun 2019 15:46:08 -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 99844 invoked by uid 89); 28 Jun 2019 15:46:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.143.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 28 Jun 2019 15:46:06 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 5C2832B373B for ; Fri, 28 Jun 2019 10:46:05 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id gt4fhBaOOdnCegt4fhkqs2; Fri, 28 Jun 2019 10:46:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GyxzmAHaQIrypUN++Gw/vPyMsBOcp2uhasr42xn1X2A=; b=tZvF3dlXAM2LidhCYwVrynLhva KXuxVWlkdezc1TN7at3nEu3navvod+TJAAX7wz1/9Td25XjbwmPRWMFklg1hlmmSNy0uKqlImpcOq AGn1MocD4ISvfHOPnAviUn8qv; Received: from 75-166-12-78.hlrn.qwest.net ([75.166.12.78]:50784 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hgt4f-002pBL-54; Fri, 28 Jun 2019 10:46:05 -0500 From: Tom Tromey To: Pedro Alves Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH 4/5] Fix latent bug in test_gdb_complete_cmd_multiple References: <20190627191427.20742-1-palves@redhat.com> <20190627191427.20742-5-palves@redhat.com> <871rzd223d.fsf@tromey.com> <53a1cc84-3d75-f074-8ddd-862dd07343b2@redhat.com> Date: Fri, 28 Jun 2019 15:46:00 -0000 In-Reply-To: <53a1cc84-3d75-f074-8ddd-862dd07343b2@redhat.com> (Pedro Alves's message of "Fri, 28 Jun 2019 15:56:21 +0100") Message-ID: <87blyhzpab.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-06/txt/msg00637.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> On 6/28/19 3:53 PM, Tom Tromey wrote: >>>>>>> "Pedro" == Pedro Alves writes: >> Pedro> if {$max_completions} { Pedro> + set cmd_prefix_re [string_to_regexp $cmd_prefix] Pedro> append expected_re \ Pedro> - "$cmd_prefix \\*\\*\\* List may be truncated, max-completions reached\\. \\*\\*\\*.*\r\n" Pedro> + "$cmd_prefix_re \\*\\*\\* List may be truncated, max-completions reached\\. \\*\\*\\*.*\r\n" Pedro> } >> Pedro> set cmd_re [string_to_regexp "complete $cmd_prefix$completion_word"] >> >> It looks like this is going to end up running string_to_regexp twice -- >> once in the "if" and then again here, which is probably not desirable. Pedro> It won't because the second time is still referring to $cmd_prefix, Pedro> while the new code introduces a new $cmd_prefix_re variable. Indeed, I misread that. Thanks. Tom