From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16038 invoked by alias); 21 Dec 2011 06:45:21 -0000 Received: (qmail 16014 invoked by uid 22791); 21 Dec 2011 06:45:19 -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, 21 Dec 2011 06:45:06 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 834892BAEDB; Wed, 21 Dec 2011 01:45:05 -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 2V-aRpbB22aS; Wed, 21 Dec 2011 01:45:05 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 1235D2BAE4E; Wed, 21 Dec 2011 01:45:04 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id DE2F4145615; Tue, 20 Dec 2011 22:44:53 -0800 (PST) Date: Wed, 21 Dec 2011 06:52:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org, Keith Seitz Subject: Re: [RFC/RFA] Add handling for unqualified Ada operators in linespecs Message-ID: <20111221064453.GC23376@adacore.com> References: <1323810763-5563-1-git-send-email-brobecker@adacore.com> <20111217144524.GZ21915@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-12/txt/msg00708.txt.bz2 > Joel> Because the double quotes are part of the operator name... Eg: > > Joel> function "+" (A, B: My_Type) return My_Type; > > I think this could mess with the lexing plans. The original plan was > for quotes to mean quoting. This approach means there is a situation > where the quotes are part of the name. > > Keith... ? If it makes thing simpler for the debugger, we could consider the idea of accepting just + as the function name, without the quotes, and consider the quotes as linespec quotes rather than part of the function name. It would mean that GDB would end up accepting the following 3 forms instead of just the first one: break "+" break '+' break + But that would be OK. In Ada, '+' is really the character '+', so it would normally make no sense in a linespec. But on the other hand, since it makes no sense at all, we can assume that no one in their right mind will ever use it, and if they do, then call it a feature (because there is no other sensible thing to do anyway). It is worth mentioning the fact that `break +' currently assumes that the `+' starts an offset, rather than indicates an operator name. Surprisingly, I would have expected this to be equilvalent to `break +0', whereas it seems to be equivalent to `break +5'!!! Oh, not documented in the GDB manual, but seems definitely intentional - see decode_all_digits: case plus: if (q == *argptr) val.line = 5; -- Joel