From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29343 invoked by alias); 14 Oct 2008 20:55:33 -0000 Received: (qmail 29334 invoked by uid 22791); 14 Oct 2008 20:55:32 -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 20:54:53 +0000 Received: (qmail 5187 invoked from network); 14 Oct 2008 20:54:51 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Oct 2008 20:54:51 -0000 From: Pedro Alves To: gdb-patches@sourceware.org, tromey@redhat.com Subject: Re: PATCH: Remove dead code, clear breakpoint ignore counts? Date: Tue, 14 Oct 2008 20:55:00 -0000 User-Agent: KMail/1.9.9 Cc: Stan Shebs References: <200810141910.49306.pedro@codesourcery.com> <200810141952.58714.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810142155.10811.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/msg00355.txt.bz2 On Tuesday 14 October 2008 21:03:44, Tom Tromey wrote: > >>>>> "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. Yeah. I've just done so. > 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 that comes from the fact that there's no easy way to reset the hit count of the breakpoint (or of all breakpoints), other than delete,re-create'ing it (them). > 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. Yeah. > 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? I dunno. I don't actually rely on those counters myself that often. I was noticing that currently, in a multi-process GDB, if I do "run" followed by another "run", while the first process is still live (I don't kill it), all hit counts are being reset. That seemed wrong. I guess we'll be getting back to this sooner or later. I'm happy for now. :-) Thanks! -- Pedro Alves