From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14288 invoked by alias); 28 Jul 2011 05:19:03 -0000 Received: (qmail 14279 invoked by uid 22791); 28 Jul 2011 05:19:01 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-yx0-f169.google.com (HELO mail-yx0-f169.google.com) (209.85.213.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Jul 2011 05:18:44 +0000 Received: by yxn22 with SMTP id 22so1506344yxn.0 for ; Wed, 27 Jul 2011 22:18:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.200.131 with SMTP id z3mr661062yhn.322.1311830323695; Wed, 27 Jul 2011 22:18:43 -0700 (PDT) Received: by 10.236.109.131 with HTTP; Wed, 27 Jul 2011 22:18:43 -0700 (PDT) In-Reply-To: References: <20110505162855.GA2546@adacore.com> <83bozgmhil.fsf@gnu.org> <83k4dcd1bh.fsf@gnu.org> Date: Thu, 28 Jul 2011 15:18:00 -0000 Message-ID: Subject: Re: [RFC] canonical linespec and multiple breakpoints ... From: Matt Rice To: Tom Tromey Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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-07/txt/msg00785.txt.bz2 On Tue, Jul 26, 2011 at 12:53 PM, Tom Tromey wrote: > First of all, pinging Pedro -- I would greatly appreciate your > commentary to help unblock this project. > > Tom> I propose a simple rule for the handling of ambiguous linespecs: a > Tom> breakpoint whose argument is ambiguous will fire at all matching > Tom> locations. =A0This rule has several properties that I consider desir= able: > > Tom> * It is simple to explain to users > Tom> * It is predictable > Tom> * It is time-invariant > Tom> * It is implementable ;-) > > This week while discussing this and other things on irc, we came up with > a possible problem with the proposal: it interacts poorly with lazy > debuginfo reading. > Another approach which would work with lazy debuginfo reading would be to modify your original proposal with a continuation. Change 'fire at all matching locations'. to 'find one or more matches stopping at the first object file to provide a match' then embedding a continuation into the breakpoint and a command to 'resume finding matches'. It seems a more involved implementation than the 'permanent pending breakpoint' option... thus the interface would be something like: break foo resolve-next-match BPNUM resolve-all-matches BPNUM (or the appropriate `modify' variant) and so on until finding the "foo" that is wanted, or object files are exhau= sted. it doesn't hit: '* it is predictable' because its outcome is order dependent, and the commands may need to be run number-of-matches times. i'm not really leaning in preference to either option, just wanted to put the idea out there.