From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5941 invoked by alias); 17 Dec 2011 14:45:48 -0000 Received: (qmail 5929 invoked by uid 22791); 17 Dec 2011 14:45:47 -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; Sat, 17 Dec 2011 14:45:33 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E82D42BACE1; Sat, 17 Dec 2011 09:45: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 BiJVKORFUrcW; Sat, 17 Dec 2011 09:45:32 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 7A6402BACDF; Sat, 17 Dec 2011 09:45:32 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 295A7145615; Sat, 17 Dec 2011 06:45:24 -0800 (PST) Date: Sat, 17 Dec 2011 14:55:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFC/RFA] Add handling for unqualified Ada operators in linespecs Message-ID: <20111217144524.GZ21915@adacore.com> References: <1323810763-5563-1-git-send-email-brobecker@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/msg00571.txt.bz2 Hi Tom Thanks for the review! > I think we should continue trying to look at solutions to linespec and > symbol table problems in as language-independent a way as possible. > And, if we can't be language-independent, we should endeavor to have > clean code; the current stuff is still a big mess. I agree. I haven't had much time to think about this, but I think it might be quite a challenging project. I need to get up to speed on Keith's project... > Joel> + p = *argptr; > Joel> + if (p[0] == '"' > > Why only double quotes? Because the double quotes are part of the operator name... Eg: function "+" (A, B: My_Type) return My_Type; And if we wanted to be pedantic, the debugger should also accept: (gdb) break '"+"' By comparison, '+' is an entirely different thing (the character +), and thus breaking on '+' should be rejected. That being said, if it helps Keith's work to treat them similarly, then I don't mind being a little approximate here, and treat both quote characters as the equivalent for linespec purposes. I doubt that any Ada programer would ever write... (gdb) break '+' ... and if that were the case, that he'd complain much about it inserting a breakpoint on operator "+". -- Joel