From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14324 invoked by alias); 4 Jun 2010 13:54:30 -0000 Received: (qmail 14314 invoked by uid 22791); 4 Jun 2010 13:54:29 -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; Fri, 04 Jun 2010 13:53:52 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o54DrSju028003 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 4 Jun 2010 09:53:28 -0400 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o54DrPYx009544 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Jun 2010 09:53:27 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o54DrOuQ012185; Fri, 4 Jun 2010 15:53:24 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o54DrNtA012183; Fri, 4 Jun 2010 15:53:23 +0200 Date: Fri, 04 Jun 2010 13:54:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: Sergio Durigan Junior , gdb-patches@sourceware.org Subject: Re: [PATCH] Forbid watchpoint on a constant value Message-ID: <20100604135323.GA5527@host0.dyn.jankratochvil.net> References: <20100521070500.GA30452@host0.dyn.jankratochvil.net> <201005211824.20290.sergiodj@redhat.com> <201005211912.39680.sergiodj@redhat.com> <20100528231122.GO3019@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100528231122.GO3019@adacore.com> User-Agent: Mutt/1.5.20 (2009-12-10) 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-06/txt/msg00115.txt.bz2 On Sat, 29 May 2010 01:11:22 +0200, Joel Brobecker wrote: > > +/* This checks if each element of EXP is not a > > + constant expression for a watchpoint. > > + > > + Returns 1 if EXP is constant, 0 otherwise. */ > > /* Return non-zero iff EXP is an expression whose value can never change. */ The former comment was vague enough I agreed with it. But the new one is explicit enough to be unfortunately IMO incorrect. Return non-zero if EXP is verified as constant. Returned zero means EXP is variable. Also the constant detection may fail for some constant expressions and in such case still falsely return zero. OK this way? Thanks, Jan