public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Keith Seitz <keiths@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 05/18] Implement completion limiting for ada_make_symbol_completion_list.
Date: Thu, 21 May 2015 23:36:00 -0000	[thread overview]
Message-ID: <001a11c35e5c4e462c0516a002e3@google.com> (raw)

Keith Seitz writes:
  > This patch converts the one Ada completion(-related) function,
  > symbol_completion_add, to use maybe_add_completion, and tests have
  > been added to exercise this newly implemented behavior.
  >
  > gdb/ChangeLog
  >
  > 	* ada-lang.c (symbol_completion_add): Return
  > 	add_completion_status instead of void.
  > 	Use add_completion and return the status of this function.
  > 	(ada_make_symbol_completion_list): If symbol_completion_add
  > 	returns that maximum completions have been reached, stop
  > 	looking for completions and return the list.
  >
  > gdb/testsuite/ChangeLog
  >
  > 	* gdb.ada/complete.exp (limit_multi_line): New procedure.
  > 	Update existing tests for source changes.
  > 	Add additional tests for new types.
  > 	Add tests for completion limiting.
  > 	* gdb.ada/complete/foo.adb (Repeat_Variable_1, Repeat_Variable_2,
  > 	Repeat_Variable_3, Repeat_Variable_4): Define.
  > 	* gdb.ada/complete/pck.ads (Repeat_Variable_1, Repeat_Variable_2)
  > 	(Repeat_Variable_3, Repeat_Variable_4): Declare.
  > 	(Repeated_1, Repeated_2, Repeated_3, Repeated_4): Define.
  > ---
  >  gdb/ada-lang.c                         |   56 +++++++++---
  >  gdb/testsuite/gdb.ada/complete.exp     |  144  
++++++++++++++++++++++++++++++++
  >  gdb/testsuite/gdb.ada/complete/foo.adb |    4 +
  >  gdb/testsuite/gdb.ada/complete/pck.ads |   12 +++
  >  4 files changed, 199 insertions(+), 17 deletions(-)
  >
  > diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
  > index e5469c0..fd824ee 100644
  > --- a/gdb/ada-lang.c
  > +++ b/gdb/ada-lang.c
  > @@ -6122,8 +6122,9 @@ symbol_completion_match (const char *sym_name,
  >     encoded formed (in which case the completion should also be
  >     encoded).  */
  >
  > -static void
  > +static enum add_completion_status
  >  symbol_completion_add (VEC(char_ptr) **sv,
  > +		       struct completer_data *cdata,
  >                         const char *sym_name,
  >                         const char *text, int text_len,
  >                         const char *orig_text, const char *word,
  > @@ -6134,7 +6135,7 @@ symbol_completion_add (VEC(char_ptr) **sv,
  >    char *completion;
  >
  >    if (match == NULL)
  > -    return;
  > +    return 0;

return ADD_COMPLETION_OK?

             reply	other threads:[~2015-05-21 23:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21 23:36 Doug Evans [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-05-04 19:18 [PATCH v2 00/18] Implement full completer limiting Keith Seitz
2015-05-04 19:18 ` [PATCH v2 05/18] Implement completion limiting for ada_make_symbol_completion_list Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=001a11c35e5c4e462c0516a002e3@google.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).