From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9211 invoked by alias); 9 Nov 2011 17:56:52 -0000 Received: (qmail 9064 invoked by uid 22791); 9 Nov 2011 17:56:51 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 Nov 2011 17:56:33 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5579B2BAE49; Wed, 9 Nov 2011 12:56:32 -0500 (EST) 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 Lj8-P-1I39vZ; Wed, 9 Nov 2011 12:56:32 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 1384D2BAE01; Wed, 9 Nov 2011 12:56:32 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 10938145615; Wed, 9 Nov 2011 12:56:23 -0500 (EST) Date: Wed, 09 Nov 2011 17:56:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: Jerome Guitton , Jan Kratochvil , gdb-patches@sourceware.org Subject: Re: RFA: implement ambiguous linespec proposal Message-ID: <20111109175623.GP14508@adacore.com> References: <20111028221459.GA28467@host1.jankratochvil.net> <20111104074543.GA13839@host1.jankratochvil.net> <20111109160529.GO14508@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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 X-SW-Source: 2011-11/txt/msg00240.txt.bz2 > Joel> [1]: We tried contributing it, but it was too hacky to really be part > Joel> of the FSF sources. The main complaint at the time was the fact > Joel> that it introduced a canonical form that was specific to Ada. I was > Joel> planning on looking at generalizing it to all languages, but never > Joel> got around to doing it. > > Do you have a URL? This would be a good time to resurrect it. Sure, although I don't know if you really need to re-read the messages or not. I think you already know quite a bit about it, and I can tell you the rest... http://www.sourceware.org/ml/gdb-patches/2008-01/msg00008.html Another message regarding the subject, this time involving Pascal: http://www.sourceware.org/ml/gdb-patches/2008-09/msg00379.html > I would like to take a look... I don't know Ada, though, so I'm going to > guess that I probably won't be able to fix it up. And I don't really expect you to. Either I fix it up with you, or maybe you provide a hook somewhere that I can then implement, etc. > In terms of the proposed patch, the key question is whether rewriting > is needed for Ada, and if so, whether it can be done uniquely. It is needed, and that's what we do at AdaCore. That's the new canonical form that I was mentioning in the previous messages. I don't think it is 100% unique, but it's pretty close, and I think it's the best we can do (we've never heard reports of problems with that form in the 10+ years we've been using it). The canonical form for Ada is: FILE:FUNCTION_NAME:LINE_NO. Once written in that form, the linespec parser should always re-evaluate it into one single logical breakpoint (with potentially multiple locations). The question is, can we use that same form for everyone? I thought you were going to do unconditional rewriting of the location string, but now I'm not so sure anymore... -- Joel