From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6065 invoked by alias); 14 Oct 2008 20:10:52 -0000 Received: (qmail 6052 invoked by uid 22791); 14 Oct 2008 20:10:52 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 14 Oct 2008 20:10:16 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id m9EK65KO000806; Tue, 14 Oct 2008 16:06:05 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m9EK64sP012187; Tue, 14 Oct 2008 16:06:04 -0400 Received: from opsy.redhat.com (vpn-12-166.rdu.redhat.com [10.11.12.166]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id m9EK61IC021503; Tue, 14 Oct 2008 16:06:03 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 0122D5084D6; Tue, 14 Oct 2008 14:03:44 -0600 (MDT) To: Pedro Alves Cc: Stan Shebs , gdb-patches@sourceware.org Subject: Re: PATCH: Remove dead code, clear breakpoint ignore counts? References: <200810141910.49306.pedro@codesourcery.com> <48F4E5A0.6010602@earthlink.net> <200810141952.58714.pedro@codesourcery.com> From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: Tue, 14 Oct 2008 20:10:00 -0000 In-Reply-To: <200810141952.58714.pedro@codesourcery.com> (Pedro Alves's message of "Tue\, 14 Oct 2008 19\:52\:58 +0100") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00354.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> Seems like it. :-) I guess I wasn't that clear, but the actual Pedro> code that initialy bothered me was the clearing the *ignore* Pedro> counts in generic_mourn_inferior, or better, the comment there Pedro> that I must have read a hundred times already by now, although Pedro> it's dead code. I say just nuke it. If it has been dead for 14 years, then nobody cares. Pedro> Just curious, do people think that it's useful to clear the hit Pedro> count automatically at all, considering that we do it on "run" but not Pedro> on "attach" or "target remote"? I occasionally use this feature to figure out how I ought to set ignore counts. E.g., set a breakpoint, run, "c 99999", wait for the crash, and then ignore one less than the hit count. This idiom relies on re-running, so it is not very useful with attach. I guess it is tough to change behavior that has been deployed for many years, since it is hard to guess how people are using it. Pedro> I can't seem to make up my mind on it. It's still logicaly the Pedro> same breakpoint across runs, so it could make sense to not do Pedro> so. Offhand I could not think of a way I would use the hit count if it were not auto-cleared. When would I want to know the accumulated total of hits across all runs? Stan> Hit counts are going to get a little messy for multi-process, because Stan> each inferior could have a different hit count, and it seems more useful Stan> to have a per-inferior hit count than an aggregate over all the Stan> inferiors to which the breakpoint applies. Pedro> Right, that would mean storing a hit count per-breakpoint Pedro> location as well as per-breakpoint, it seems. Same for ignore Pedro> counts. I would probably just set a breakpoint specific to a particular inferior if I was worried about this case. Tom