From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 518 invoked by alias); 20 May 2010 23:23:14 -0000 Received: (qmail 510 invoked by uid 22791); 20 May 2010 23:23:14 -0000 X-SWARE-Spam-Status: No, hits=-5.8 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:23:08 +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 o4KNMbqm001526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 20 May 2010 19:22:37 -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 o4KNMWrT011186; Thu, 20 May 2010 19:22:33 -0400 From: Sergio Durigan Junior To: Joel Brobecker Subject: Re: [PATCH] Forbid watchpoint on a constant value Date: Thu, 20 May 2010 23:31: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> <20100520231308.GM3019@adacore.com> In-Reply-To: <20100520231308.GM3019@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201005202022.30149.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/msg00467.txt.bz2 On Thursday 20 May 2010 20:13:08, Joel Brobecker wrote: > > Joel mentioned this patch yesterday, so here it is. This patch forbids > > the user to create a watchpoint on a constant value. The idea is pretty > > trivial: > > > > (gdb) watch 5 > > Cannot watch constant value 5. > > Without looking at the specifics of the patch for now, I am wondering > what other people think of the idea itself. For myself, I can see how > a warning might be useful, but forbidding it might be viewed as > a little excessive, particularly if there is a bug in GDB (or in > the debugging info!!!) that makes it think it's constant when in fact > it's not. Hi Joel, 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. Thanks, -- Sergio Durigan Junior Red Hat