From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2750 invoked by alias); 14 Nov 2007 05:02:50 -0000 Received: (qmail 2737 invoked by uid 22791); 14 Nov 2007 05:02:47 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 14 Nov 2007 05:02:41 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 342952A9630; Wed, 14 Nov 2007 00:02:39 -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 0WtFjB37LmzT; Wed, 14 Nov 2007 00:02:39 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id EE3AC2A95F9; Wed, 14 Nov 2007 00:02:38 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 391B4E7ACA; Tue, 13 Nov 2007 21:02:36 -0800 (PST) Date: Wed, 14 Nov 2007 05:02:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: Douglas Evans , ghost@cs.msu.su, gdb@sources.redhat.com Subject: Re: Multiple breakpoint locations Message-ID: <20071114050236.GC1312@adacore.com> References: <18233.63439.953202.586908@kahikatea.snap.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00121.txt.bz2 > > I think it's a question of how much complexity one wants here. AIUI, > > the breakpoint is represented as source+line. One would have to > > augment that to mean source+line+except-this (I think). > > Not necessarily. You could look up the struct bp_location that > corresponds to 1.1 (by using its address as a key), and remove that > struct bp_location from the chain we maintain for breakpoint 1. The design issue occurs in certain situations when we have to recompute the breakpoint location addresses. For instance, when a shared library gets loaded, we recompute the breakpoint locations. So, when you delete a bp_location, we need to have a way of being able to make sure that it is not re-inserted the next time we recompute the breakpoint locations. We could compromise and have a caveat where GDB doesn't worry for now about remembering which bp_location we deleted. This might cause a bp_location to re-appear unexpectedly, but there will be some situations under which things should work fine. For instance, if the breakpoint is inserted after the program has been started and all shared libraries are loaded, as long as the program does not load manually extra shared libraries, it shouldn't be a problem. It's a bit dogdy, and will require ample documentation, but it's a thought. -- Joel