From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20580 invoked by alias); 5 Feb 2008 00:36:51 -0000 Received: (qmail 20571 invoked by uid 22791); 5 Feb 2008 00:36:51 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 05 Feb 2008 00:36:16 +0000 Received: from kahikatea.snap.net.nz (136.62.255.123.dynamic.snap.net.nz [123.255.62.136]) by viper.snap.net.nz (Postfix) with ESMTP id 8C9173DA0EB; Tue, 5 Feb 2008 13:36:13 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 0BE588FC6D; Tue, 5 Feb 2008 13:36:05 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18343.44916.257484.863207@kahikatea.snap.net.nz> Date: Tue, 05 Feb 2008 00:36:00 -0000 To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: (gdb-6.8) Discard breakpoint address if shared library is unloaded In-Reply-To: <20080205002116.GK21614@adacore.com> References: <20080204214226.GF20922@adacore.com> <18343.35253.667689.989145@kahikatea.snap.net.nz> <20080205001213.GJ21614@adacore.com> <20080205002116.GK21614@adacore.com> X-Mailer: VM 7.19 under Emacs 22.1.50.23 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: 2008-02/txt/msg00100.txt.bz2 > And I forgot. You can also avoid some code duplication by changing: > > Index: breakpoint.c > =================================================================== > --- breakpoint.c (revision 146) > +++ breakpoint.c (working copy) > @@ -3506,7 +3506,7 @@ print_one_breakpoint_location (struct br > if (addressprint) > { > annotate_field (4); > - if (b->loc == NULL) > + if (b->loc == NULL || loc->shlib_disabled) > ui_out_field_string (uiout, "addr", ""); > else if (header_of_multiple) > ui_out_field_string (uiout, "addr", ""); That's what I had originally (http://sourceware.org/ml/gdb-patches/2007-11/msg00262.html) but Vladimir said: (http://sourceware.org/ml/gdb-patches/2007-11/msg00266.html) I believe that in a case of breakpoint with multiple locations, where the first location is shlib_disabled, the updated code will print as address, not . I think the right approach would be moving the check for loc->shlib_disabled later, like this: ... so I did this as he was the author of the original patch. -- Nick http://www.inet.net.nz/~nickrob