This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 12/40] "complete" command and completion word break characters
- From: Keith Seitz <keiths at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>, gdb-patches at sourceware dot org
- Date: Fri, 14 Jul 2017 10:49:55 -0700
- Subject: Re: [PATCH 12/40] "complete" command and completion word break characters
- Authentication-results: sourceware.org; auth=none
- 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 at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EC0814E048
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EC0814E048
- References: <1496406158-12663-1-git-send-email-palves@redhat.com> <1496406158-12663-13-git-send-email-palves@redhat.com>
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