From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28771 invoked by alias); 5 Feb 2008 00:54:46 -0000 Received: (qmail 28735 invoked by uid 22791); 5 Feb 2008 00:54:45 -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:54:17 +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 13BA53DA095; Tue, 5 Feb 2008 13:54:15 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 4CD0A8FC6D; Tue, 5 Feb 2008 13:54:06 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18343.45995.719252.980359@kahikatea.snap.net.nz> Date: Tue, 05 Feb 2008 00:54: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: <20080205001213.GJ21614@adacore.com> References: <20080204214226.GF20922@adacore.com> <18343.35253.667689.989145@kahikatea.snap.net.nz> <20080205001213.GJ21614@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/msg00101.txt.bz2 > I have a question: Isn't this part going to break your parser as well? Yes. It was in my original patch but I seem to have lost it somehow in the intervening period. I attach the updated patch. Thanks. > 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 2008-02-05 Nick Roberts * breakpoint.c (print_one_breakpoint_location): Revert Enb field to old format. Discard breakpoint address if shared library is unloaded. *** breakpoint.c 04 Feb 2008 09:10:59 +1300 1.301 --- breakpoint.c 05 Feb 2008 13:46:40 +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 *** 3436,3446 **** 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)" : ""); ! if (!pending) ! ui_out_spaces (uiout, 3); } --- 3433,3440 ---- state -- it will be apparent from the locations. */ if (header_of_multiple) pending = 0; ! ui_out_field_fmt (uiout, "enabled", "%c", ! bpenables[(int) b->enable_state]); } *************** print_one_breakpoint_location (struct br *** 3556,3561 **** --- 3550,3557 ---- 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); }