From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24068 invoked by alias); 14 Jul 2017 17:50:00 -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 24052 invoked by uid 89); 14 Jul 2017 17:49:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=our 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; Fri, 14 Jul 2017 17:49:58 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EC0814E048 for ; Fri, 14 Jul 2017 17:49:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EC0814E048 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=keiths@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EC0814E048 Received: from valrhona.uglyboxes.com (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A52E85C2F5; Fri, 14 Jul 2017 17:49:56 +0000 (UTC) Subject: Re: [PATCH 12/40] "complete" command and completion word break characters To: Pedro Alves , gdb-patches@sourceware.org References: <1496406158-12663-1-git-send-email-palves@redhat.com> <1496406158-12663-13-git-send-email-palves@redhat.com> From: Keith Seitz Message-ID: <59690443.3080306@redhat.com> Date: Fri, 14 Jul 2017 17:50:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1496406158-12663-13-git-send-email-palves@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00197.txt.bz2 On 06/02/2017 05:22 AM, Pedro Alves wrote: > First, the complete command has a too-simple approximation of what > readline's TAB-completion code does to find the completion word point. > Unfortunately, readline doesn't expose the functionality it uses > internally, so to fix this this patch copies over the relevant code, > and adjusts it a bit to better fit the use cases we need it for. > (Specifically, our version avoids relying on the > rl_word_break_characters, etc. globals, and instead takes those as > arguments.) re: "copies over the relevant code" Is it possible to mention this in/around the copied code? That might make it easier to track differences in the future, e.g., if someone found a problem with the copied code, he could look upstream for a fix (or report a bug). > > diff --git a/gdb/completer.h b/gdb/completer.h > index e554bff..207781d 100644 > --- a/gdb/completer.h > +++ b/gdb/completer.h > @@ -203,6 +203,10 @@ extern void complete_line (completion_tracker &tracker, > const char *line_buffer, > int point); > > +extern const char *completion_find_completion_word (completion_tracker &tracker, > + const char *text, > + int *quote_char); > + Missing comment? Keith