From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8432 invoked by alias); 14 Oct 2008 18:53:19 -0000 Received: (qmail 8423 invoked by uid 22791); 14 Oct 2008 18:53:19 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 14 Oct 2008 18:52:41 +0000 Received: (qmail 376 invoked from network); 14 Oct 2008 18:52:39 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Oct 2008 18:52:39 -0000 From: Pedro Alves To: Stan Shebs Subject: Re: PATCH: Remove dead code, clear breakpoint ignore counts? Date: Tue, 14 Oct 2008 18:53:00 -0000 User-Agent: KMail/1.9.9 Cc: gdb-patches@sourceware.org References: <200810141910.49306.pedro@codesourcery.com> <48F4E5A0.6010602@earthlink.net> In-Reply-To: <48F4E5A0.6010602@earthlink.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810141952.58714.pedro@codesourcery.com> 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-10/txt/msg00353.txt.bz2 On Tuesday 14 October 2008 19:32:00, Stan Shebs wrote: > Pedro Alves wrote: > > I think I stared at this one time too many. > > > > What do you think of the attached? Would anyone miss this? There's > > no way the user can request to not show hit counts, so, this is dead > > code. > > > Heh, I can't even remember why it seemed like there was any interest in > conditionalizing; perhaps because the hit counts were a new feature and > we thought users would want to be able to go back to the old behavior. > In any case, I think by now there is consensus that hit counts are good > to display. :-) Seems like it. :-) I guess I wasn't that clear, but the actual code that initialy bothered me was the clearing the *ignore* counts in generic_mourn_inferior, or better, the comment there that I must have read a hundred times already by now, although it's dead code. Just curious, do people think that it's useful to clear the hit count automatically at all, considering that we do it on "run" but not on "attach" or "target remote"? I can't seem to make up my mind on it. It's still logicaly the same breakpoint across runs, so it could make sense to not do so. > > Hit counts are going to get a little messy for multi-process, because > each inferior could have a different hit count, and it seems more useful > to have a per-inferior hit count than an aggregate over all the > inferiors to which the breakpoint applies. > Right, that would mean storing a hit count per-breakpoint location as well as per-breakpoint, it seems. Same for ignore counts. I'm sure there's a user out there who would find that useful for breakpoints with multiple locations in the single-inferior case too. :-) -- Pedro Alves