From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9462 invoked by alias); 5 Feb 2008 00:12:45 -0000 Received: (qmail 9450 invoked by uid 22791); 5 Feb 2008 00:12:44 -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:12:18 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5D26E2AA151; Mon, 4 Feb 2008 19:12:16 -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 BWx-ympzihqt; Mon, 4 Feb 2008 19:12:16 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 1EBB42AA117; Mon, 4 Feb 2008 19:12:16 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id D71EBE7ACB; Mon, 4 Feb 2008 16:12:13 -0800 (PST) Date: Tue, 05 Feb 2008 00:12: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: <20080205001213.GJ21614@adacore.com> References: <20080204214226.GF20922@adacore.com> <18343.35253.667689.989145@kahikatea.snap.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18343.35253.667689.989145@kahikatea.snap.net.nz> 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/msg00098.txt.bz2 > I think the patch below, based on my initial patch and Vladimir's subsequent > comment, will fix it. No regressions. This looks fine. But I'd like to hear at least from Vladimir. I have a question: Isn't this part going to break your parser as well? int pending = (b->loc == NULL || b->loc->shlib_disabled); /* For header of multiple, there's no point showing pending state -- it will be apparent from the locations. */ if (header_of_multiple) pending = 0; ui_out_field_fmt (uiout, "enabled", "%c%s", bpenables[(int) b->enable_state], pending ? "(p)" : ""); This is the counterpart of the branch you modified. As you can see, it can print the dreaded "(p)" in addition to the y/n enabled state. > -- > Nick http://www.inet.net.nz/~nickrob > > > *** breakpoint.c 04 Feb 2008 09:10:59 +1300 1.301 > --- breakpoint.c 04 Feb 2008 09:11:02 +1300 > *************** print_one_breakpoint_location (struct br > *** 3425,3434 **** > /* 4 */ > annotate_field (3); > if (part_of_multiple) > ! ui_out_field_string (uiout, "enabled", > ! loc->shlib_disabled > ! ? (loc->enabled ? "y(p)" : "n(p)") > ! : (loc->enabled ? "y" : "n")); > else > { > int pending = (b->loc == NULL || b->loc->shlib_disabled); > --- 3425,3431 ---- > /* 4 */ > annotate_field (3); > if (part_of_multiple) > ! ui_out_field_string (uiout, "enabled", loc->enabled ? "y" : "n"); > else > { > int pending = (b->loc == NULL || b->loc->shlib_disabled); > *************** 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); > } -- Joel