From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14469 invoked by alias); 20 May 2010 23:55:33 -0000 Received: (qmail 14458 invoked by uid 22791); 20 May 2010 23:55:32 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Thu, 20 May 2010 23:55:27 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4KNsxQg019503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 20 May 2010 19:54:59 -0400 Received: from psique.localnet (vpn-242-33.phx2.redhat.com [10.3.242.33]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4KNsvTL016838; Thu, 20 May 2010 19:54:59 -0400 From: Sergio Durigan Junior To: Joel Brobecker Subject: Re: [PATCH] Forbid watchpoint on a constant value Date: Fri, 21 May 2010 00:09:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.32.11-99.fc12.x86_64; KDE/4.4.2; x86_64; ; ) Cc: gdb-patches@sourceware.org, Jan Kratochvil References: <201005181418.24324.sergiodj@redhat.com> <201005202022.30149.sergiodj@redhat.com> <20100520233449.GO3019@adacore.com> In-Reply-To: <20100520233449.GO3019@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201005202054.53548.sergiodj@redhat.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-05/txt/msg00470.txt.bz2 On Thursday 20 May 2010 20:34:49, Joel Brobecker wrote: > > Thanks for your review. I don't really have a strong opinion about it, > > but your suggestion sounds pretty reasonable to me. Since Jan is the > > co-author of this patch, I'll wait to see what he thinks about it. > > I don't have a strong opinion on it either, which is why I am interested > in other people's thoughts on it. What was your own motivation behind > this? I guess some user inserted a watchpoint on something constant, > and then waited for ages for the watchpoint to trigger, thinking that > the slowness was due to the watchpoint, not his, er... silliness :-P? The patch was in our internal tree for a while (Jan has written the first version of it), so I don't really know his motivations behind it. But the scenario you described may not be that rare :-). FWIW, I actually was thinking a little more about the subject, and I agree with your suggestion. GDB may not forbid the user to do what he wants (even if that appears to be totally non-sense). I think a warning message, in this case, is the best option indeed. If Jan agrees with that, I'll submit a refreshed version of the patch with that modification (along with the other ones that I promised). Thanks, -- Sergio Durigan Junior Red Hat