Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: Stan Shebs <stanshebs@earthlink.net>, gdb-patches@sourceware.org
Subject: Re: PATCH: Remove dead code, clear breakpoint ignore counts?
Date: Tue, 14 Oct 2008 20:10:00 -0000	[thread overview]
Message-ID: <m33aizgd0f.fsf@fleche.redhat.com> (raw)
In-Reply-To: <200810141952.58714.pedro@codesourcery.com> (Pedro Alves's message of "Tue\, 14 Oct 2008 19\:52\:58 +0100")

>>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> 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


  reply	other threads:[~2008-10-14 20:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-14 18:11 Pedro Alves
2008-10-14 18:33 ` Stan Shebs
2008-10-14 18:53   ` Pedro Alves
2008-10-14 20:10     ` Tom Tromey [this message]
2008-10-14 20:55       ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m33aizgd0f.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    --cc=stanshebs@earthlink.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox