From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21608 invoked by alias); 7 Jun 2011 20:24:30 -0000 Received: (qmail 21599 invoked by uid 22791); 7 Jun 2011 20:24:29 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jun 2011 20:23:55 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p57KNs10006147 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 7 Jun 2011 16:23:55 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p57KNsKY023608; Tue, 7 Jun 2011 16:23:54 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p57KNr4K020593; Tue, 7 Jun 2011 16:23:54 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 8DFC03781E9; Tue, 7 Jun 2011 14:23:53 -0600 (MDT) From: Tom Tromey To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [patch 0/2] physname reg.: C++ breakpoints / linespec fixes References: <20110605202615.GA20427@host1.jankratochvil.net> Date: Tue, 07 Jun 2011 20:24:00 -0000 In-Reply-To: <20110605202615.GA20427@host1.jankratochvil.net> (Jan Kratochvil's message of "Sun, 5 Jun 2011 22:26:15 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-06/txt/msg00102.txt.bz2 >>>>> "Jan" == Jan Kratochvil writes: Jan> linespec is IMNSHO a hack anyway and one day it should be merged Jan> with the general expression parser (used for example for `print'); Jan> which should be further merged with GCC/G++ parser. Expression Jan> Parser Plug-In Available Jan> http://sourceware.org/ml/archer/2011-q1/msg00122.html I am not sure this is the right direction. I have a few issues with it. First, it seems to me that we'll always have to keep some part of linespecs around, because 'break file:line' is important. So, we'll always have to look at the argument in multiple ways and decide what to do. Second, I suspect this ties linespecs too closely to the current language. It seems reasonable to me for 'break ns::func()' to work in a C frame. Third, IIRC your branch is based on the idea of the parser constructing an expression, which is then decoded (or evalled?) to find the correct symbol. I think this approach neglects the possibility that a linespec could be ambiguous, another hot topic. That said, I would welcome a detailed plan to redo linespec. Maybe those objections are not very strong. Tom