From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71821 invoked by alias); 27 Apr 2015 03:28:44 -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 71812 invoked by uid 89); 27 Apr 2015 03:28:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f174.google.com Received: from mail-ig0-f174.google.com (HELO mail-ig0-f174.google.com) (209.85.213.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 27 Apr 2015 03:28:42 +0000 Received: by iget9 with SMTP id t9so61277754ige.1 for ; Sun, 26 Apr 2015 20:28:40 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.42.239.212 with SMTP id kx20mr10310771icb.90.1430105319952; Sun, 26 Apr 2015 20:28:39 -0700 (PDT) Received: by 10.36.111.206 with HTTP; Sun, 26 Apr 2015 20:28:39 -0700 (PDT) In-Reply-To: References: <20150422192522.GM4764@adacore.com> Date: Mon, 27 Apr 2015 03:28:00 -0000 Message-ID: Subject: Re: GDB/MI interactive capability? From: Matt Rice To: Vladimir Prus Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00980.txt.bz2 On Sun, Apr 26, 2015 at 11:40 AM, Vladimir Prus wrote: > On 04/22/2015 10:25 PM, Joel Brobecker wrote: >> Another idea, which might be easier to implement, would be to use >> a two-step approach where the first step is to return an error >> that shows the various choices the user can choose, have the IDE >> use that to query the user, and then have the IDE resubmit the >> expression evaluation, this time with the choice given by the user. > > > That would work just fine, I think. GDB can report the ambiguities it finds, > and the frontend can resubmit the expression with appropriate syntax to > disambiguate. > I don't know whether there's appropriate syntax for Ada, in C++ a cast to > appropriate > type is sometimes used to select the right function, e.g.: > > static_cast(&C::foo) > > is the standard example. The downside is that GDB might have to know a bit > more about > language than now, or a special syntax might have to be introduced. I think it might work that instead of sending a list of stateful numbers, it instead sent a list of explicit linespecs that can be sent back to gdb I'm not entirely sure (but it seems reasonable) that explicit linespecs might avoid the ambiguity of sending a linespec to the client which can lead to things like PR 8535