From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17142 invoked by alias); 5 May 2011 16:29:18 -0000 Received: (qmail 17099 invoked by uid 22791); 5 May 2011 16:29:14 -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; Thu, 05 May 2011 16:28:58 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B69F02BAEFB for ; Thu, 5 May 2011 12:28:57 -0400 (EDT) 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 k+dkcmQR4z1y for ; Thu, 5 May 2011 12:28:57 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 8A6722BAB91 for ; Thu, 5 May 2011 12:28:57 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 8D424145615; Thu, 5 May 2011 09:28:55 -0700 (PDT) Date: Thu, 05 May 2011 16:29:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [RFC] canonical linespec and multiple breakpoints ... Message-ID: <20110505162855.GA2546@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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-05/txt/msg00142.txt.bz2 Hello, Re: [PATCH 2/6] Introduce `pre_expanded sals' http://www.sourceware.org/ml/gdb-patches/2011-04/msg00038.html http://www.sourceware.org/ml/gdb-patches/2011-05/msg00074.html Jerome and I were discussing a way to move foward without having to design everything, as the week is rapidly getting to a close. (Jerome heads back to Paris at the end of this week, and will be back to his normal schedule, so we're trying to take advantage of his presence his as much as we can). If we agree that a breakpoint expression (linespec) that gets resolved into multiple source locations (slocs) should result in one breakpoint per sloc, then we can start working on that. The above requires that we agree on a way to make sure that each breakpoint carries enough information to re-set itself, which means that the information should make the breakpoint unique. We've handled that issue by using a canonical linespec (FILE:FUNCTION:LINE), and it has worked well for us. I think that implementing the above in a way that allows each language to implement their own way of dealing with templates/generics/homonyms should be reasonably easy, and we'd still be much farther ahead than we are now. What Jerome and I propose is that we implement the infrastructure to make it work for C, and possibly Ada (we'll probably wait for the Ada bits until the infrastructure is approved). We would rather let the C++ bits to someone else, as we still have limited experience with C++ itself. We think that this will handle most situations, except the situation where new symbols cause extra slocs to appear (typically, a shared library gets mapped in memory). We are planing on plugging that hole as a followup, which can be made independently, for instance using Pedro's idea of introducing an extra level of breakpoint. The exact details on how this is going to be done need to be discussed, but, in the meantime, our experience with Ada show that the approach we are proposing as a first step has been working well for our users. Thoughts? Thanks, -- Joel