This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] [Ada] Fix completion for multiple function matches
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pierre-Marie de Rodat <derodat at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 1 Sep 2015 05:15:28 -0700
- Subject: Re: [PATCH] [Ada] Fix completion for multiple function matches
- Authentication-results: sourceware.org; auth=none
- References: <1441034710-31810-1-git-send-email-derodat at adacore dot com> <20150831172516 dot GA3356 at adacore dot com> <55E55526 dot 2000303 at adacore dot com>
> I adjusted the testcase in the way I think you meant: I added the
> Ambiguous_Prog procedure to Aux_Pck and added a test to ask the completion
> of "p ambig": GDB correctly reports two possible completions: "p
> ambiguous_func" and "p ambiguous_proc". This looks independent of function
> resolution in ada-lang, and that is fortunate in our case. :-)
>
> Is this what you had in mind?
Yep :)
> gdb/ChangeLog:
>
> * ada-lang.c (ada_resolve_function): Do not ask the user what
> match to use when in completion mode.
>
> gdb/testsuite/ChangeLog:
>
> * gdb.ada/complete.exp: Add "pck.ambiguous_func" to the relevant
> expected outputs. Add two testcases for completing ambiguous
> functions.
> * gdb.ada/complete/aux_pck.adb: New file.
> * gdb.ada/complete/aux_pck.ads: New file.
> * gdb.ada/complete/foo.adb: Pull Aux_Pck and call the two
> Ambiguous_Func functions.
> * gdb.ada/complete/pck.ads: Add an Ambiguous_Func function.
> * gdb.ada/complete/pck.adb: Likewise.
Looks good. Go ahead and push :).
Thank you, Pierre-Marie.
--
Joel