From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2022 invoked by alias); 25 Apr 2010 20:10:34 -0000 Received: (qmail 2012 invoked by uid 22791); 25 Apr 2010 20:10:32 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=BAYES_00,TW_OC,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 25 Apr 2010 20:10:25 +0000 Received: (qmail 7912 invoked from network); 25 Apr 2010 20:10:22 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 25 Apr 2010 20:10:22 -0000 From: Pedro Alves To: "Pierre Muller" Subject: Re: [RFA- v2] Testcase for bug report 11531 and fix for Solaris Date: Sun, 25 Apr 2010 20:10:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-20-generic; KDE/4.3.2; x86_64; ; ) Cc: gdb-patches@sourceware.org, "'Joel Brobecker'" References: <000301cae303$d6d068b0$84713a10$@muller@ics-cnrs.unistra.fr> <201004231915.49375.pedro@codesourcery.com> <002101cae3c0$a56276c0$f0276440$@muller@ics-cnrs.unistra.fr> In-Reply-To: <002101cae3c0$a56276c0$f0276440$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201004252110.20098.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: 2010-04/txt/msg00853.txt.bz2 On Saturday 24 April 2010 16:13:06, Pierre Muller wrote: > Work around the problem by removing hardware watchpoints if a step is > requested, GDB will check for a hardware watchpoint trigger after the > step anyway. */ > -#define CANNOT_STEP_HW_WATCHPOINTS > +/* The code related to this macro does not work > + anymore. Thus we remove this macro definition. */ > +/* #define CANNOT_STEP_HW_WATCHPOINTS */ The new comment isn't correct. I'd like to clarify this, at least for the archives. It's not that the code does not work anymore. The _main_ issue the workaround handles, is the fact that on older Solaris kernels, when stepping around a page that has a watchpoint installed, the kernel would forget the step, and hence, the inferior would run free. The workaround should still be preventing that as is. What no longer works since the workaround was written, is that GDB used to check if there was any watchpoint that triggered after all single-steps, regardless of whether the target indicating common code a watchpoint triggered or not, hence PR 11531. Obviously, having the inferior randomly running free when the user does "step" or "next" is worse than missing a watchpoint when stepping. If we still wanted to support Solaris <= 2.7, we'd still want the workaround in some form. So, it's not that it "doesn't work anymore" -- it's that the current workaround implementation is incomplete because it breaks something else. For example, we'd need to somehow make GDB core check for watchpoints after every single-step on this target. And, we would indeed want to make this conditional on the currently running kernel version, because although it should be relatively simple to workaround PR11531 (regular watchpoints), by always checking for watched value changes after all single-steps, read and write watchpoints, would be harder to unbreak. (yes, procfs.c doesn't report the stopped data address today, so read and write watchpoints don't work anyway, but it could report it, as Solaris' procfs does support that, IIRC). As nobody said they're still interested in those older Solaris' kernel, let's indeed just go the simple route of removing the whole workaround, and not leave that code commented out (as Joel suggested), but please let's keep finally removing the nm file and the associated glue for a separate patch. -- Pedro Alves