From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14240 invoked by alias); 5 Feb 2008 00:21:38 -0000 Received: (qmail 14230 invoked by uid 22791); 5 Feb 2008 00:21:38 -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; Tue, 05 Feb 2008 00:21:21 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 7FB932AA31F; Mon, 4 Feb 2008 19:21:19 -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 kk-o+ziXjSw9; Mon, 4 Feb 2008 19:21:19 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 417DB2AA322; Mon, 4 Feb 2008 19:21:19 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 09E43E7ACB; Mon, 4 Feb 2008 16:21:16 -0800 (PST) Date: Tue, 05 Feb 2008 00:21:00 -0000 From: Joel Brobecker To: Nick Roberts Cc: gdb-patches@sourceware.org Subject: Re: (gdb-6.8) Discard breakpoint address if shared library is unloaded Message-ID: <20080205002116.GK21614@adacore.com> References: <20080204214226.GF20922@adacore.com> <18343.35253.667689.989145@kahikatea.snap.net.nz> <20080205001213.GJ21614@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080205001213.GJ21614@adacore.com> User-Agent: Mutt/1.4.2.2i 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/msg00099.txt.bz2 > > *************** print_one_breakpoint_location (struct br > > *** 3556,3561 **** > > --- 3553,3560 ---- > > ui_out_field_string (uiout, "addr", ""); > > else if (header_of_multiple) > > ui_out_field_string (uiout, "addr", ""); > > + else if (loc->shlib_disabled) > > + ui_out_field_string (uiout, "addr", ""); > > else > > ui_out_field_core_addr (uiout, "addr", loc->address); 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", ""); -- Joel