Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: hardware watchpoints in non-stop - "moribund"/delayed watchpoint traps
Date: Wed, 18 Nov 2009 19:46:00 -0000	[thread overview]
Message-ID: <200911181945.50684.pedro@codesourcery.com> (raw)
In-Reply-To: <20091118183917.GA30279@host0.dyn.jankratochvil.net>

On Wednesday 18 November 2009 18:39:17, Jan Kratochvil wrote:

> The problem is it is not clear from this message there is a GDB bug and the

> testsuite already contains too many racy failures to be catching more of them.

I'd bet a couple of those are actually exactly as the all-stop case
I described and actually fixed by this change.

> > At first I thought so, but, I then changed my mind into thinking the extra
> > complexity isn't necessary.  We needed the moribund breakpoint locations
> > heuristic, to be able to distinguish random SIGTRAPs from delayed software
> > breakpoint traps.  We don't keep them indefinitly, so to reduce the
> > chances of mistaking a real random SIGTRAP from a delayed software
> > breakpoint SIGTRAP.  We don't need the heuristic with hardware watchpoint
> > traps --- we can always tell the difference.
> 
> The heuristic can be disabled in the all-stop mode remembering all watchpoint
> locations indefinitely exactly until count_events_callback() reports zero.

"indefinitely exactly until" is contradictory. :-)

Think about it.  The fact that we count a certain made-up number of events
_is_ part of the heuristic.  I've seen the moribund events count reaching
zero sooner than it should have, and GDB reporting a random
SIGTRAP by mistake.

> But sure your patch is better than the current state and I can post what
> I find more strict later.

If we have moribund watchpoint locations, then most of the races
you're talking about would still be hidden, exactly by the moribund
locations.  I don't think we'd be stricter.  It seems the only case that
wouldn't happen is the case of the target keeping reporting bad SIGTRAPs
repeatedly, but I'm sure those are noticeable by other symptoms,
like, e.g., target slowness.

Keep in mind that on targets that can't report a stopped data
address, gdb already necessarily ignores bad watchpoint traps.

-- 
Pedro Alves


  reply	other threads:[~2009-11-18 19:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-18 14:46 Pedro Alves
2009-11-18 17:01 ` Jan Kratochvil
2009-11-18 17:51   ` Pedro Alves
2009-11-18 18:40     ` Jan Kratochvil
2009-11-18 19:46       ` Pedro Alves [this message]
2009-11-18 20:52         ` Jan Kratochvil
2009-11-20 14:15           ` 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=200911181945.50684.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /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