This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 05/18] Implement completion limiting for ada_make_symbol_completion_list.


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]