From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4644 invoked by alias); 18 Nov 2009 18:40:50 -0000 Received: (qmail 4633 invoked by uid 22791); 18 Nov 2009 18:40:49 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 Nov 2009 18:39:46 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAIIdc2f017434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 18 Nov 2009 13:39:38 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nAIIdLTB013702 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 Nov 2009 13:39:37 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id nAIIdKfm030809; Wed, 18 Nov 2009 19:39:20 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id nAIIdIGs030802; Wed, 18 Nov 2009 19:39:18 +0100 Date: Wed, 18 Nov 2009 18:40:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: hardware watchpoints in non-stop - "moribund"/delayed watchpoint traps Message-ID: <20091118183917.GA30279@host0.dyn.jankratochvil.net> References: <200911181445.38897.pedro@codesourcery.com> <20091118165952.GA23719@host0.dyn.jankratochvil.net> <200911181750.50292.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200911181750.50292.pedro@codesourcery.com> User-Agent: Mutt/1.5.20 (2009-08-17) 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: 2009-11/txt/msg00409.txt.bz2 On Wed, 18 Nov 2009 18:50:50 +0100, Pedro Alves wrote: > if (debug_infrun > && !bpstat_explains_signal (ecs->event_thread->stop_bpstat) > && stopped_by_watchpoint) > fprintf_unfiltered (gdb_stdlog, > "infrun: no user watchpoint explains watchpoint event, ignoring"); > > so that we can tell from the logs if something is reporting bad > watchpoint SIGTRAPs. 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. > 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. Still the moribund infrastructure is IMO suitable for this task. But sure your patch is better than the current state and I can post what I find more strict later. Thanks, Jan