From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97955 invoked by alias); 1 Sep 2015 12:15:33 -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 97941 invoked by uid 89); 1 Sep 2015 12:15:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 01 Sep 2015 12:15:32 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 0A04429246; Tue, 1 Sep 2015 08:15:30 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Xkas8sRqCG0c; Tue, 1 Sep 2015 08:15:29 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id CEF7228D98; Tue, 1 Sep 2015 08:15:29 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 5CD44472DA; Tue, 1 Sep 2015 05:15:28 -0700 (PDT) Date: Tue, 01 Sep 2015 12:15:00 -0000 From: Joel Brobecker To: Pierre-Marie de Rodat Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] [Ada] Fix completion for multiple function matches Message-ID: <20150901121528.GB3356@adacore.com> References: <1441034710-31810-1-git-send-email-derodat@adacore.com> <20150831172516.GA3356@adacore.com> <55E55526.2000303@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55E55526.2000303@adacore.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-09/txt/msg00008.txt.bz2 > 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