From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7688 invoked by alias); 6 May 2011 19:18:15 -0000 Received: (qmail 7678 invoked by uid 22791); 6 May 2011 19:18:13 -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; Fri, 06 May 2011 19:17:54 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p46JHVcd017831 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 6 May 2011 15:17:31 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p46JHU1Y026580; Fri, 6 May 2011 15:17:30 -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 p46JHTgI023436; Fri, 6 May 2011 15:17:30 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 5E596378303; Fri, 6 May 2011 13:17:29 -0600 (MDT) From: Tom Tromey To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFC] canonical linespec and multiple breakpoints ... References: <20110505162855.GA2546@adacore.com> <20110505224016.GB2568@adacore.com> Date: Fri, 06 May 2011 19:18:00 -0000 In-Reply-To: <20110505224016.GB2568@adacore.com> (Joel Brobecker's message of "Thu, 5 May 2011 15:40:16 -0700") 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-05/txt/msg00204.txt.bz2 Tom> I am not sure about this plan. I think it relies on being able to Tom> differentiate breakpoints based on canonical linespecs, but I don't Tom> think it is always possible to construct these. Joel> Indeed, I think it is true that there are going to be times when no Joel> canonical linespec is ever going to be unique enough. For instance, Joel> the rather non-sensical case where two homonym routines are implemented Joel> on the same line of code. One thing I realized last night is that it is not necessary to require a breakpoint's canonical location to be a linespec. It could be some other data structure with a more sophisticated equality algorithm. This idea makes it possible to support a canonical descriptor of "function named foo with no debuginfo" without requiring some convoluted linespec representing this. Even with this there are going to be bad cases. E.g., the case in RH bugzilla (I think a private bug -- sorry) concerns a program that somehow embeds two different versions of the same library. In a case like this, many entities have the same names, file names, and line numbers. Tom> I keep coming back to the "simple" approach I sketched here: Tom> http://sourceware.org/ml/gdb-patches/2011-04/msg00567.html Tom> I can try to write this up into a fuller proposal if you want. Joel> Which part of your message would be the approach that you are Joel> referring to? There are two proposals that I can see: Joel> - the 3rd-tier breakpoint Joel> - one multi-location breakpoint (meaning that we break on all Joel> matches regardless) The latter. Joel> The second approach is going to be really be tough to me to sell Joel> to the Ada users. This is why I emphasized this aspect in my other Joel> email (it was lengthy, I apologize). I have some ideas on maybe Joel> finding a way to make it match our goals, but I'd rather make sure Joel> I know exactly what you meant. I will read your other note again, and Jerome's, and reply soon. Tom