From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30072 invoked by alias); 20 May 2010 23:13:16 -0000 Received: (qmail 30063 invoked by uid 22791); 20 May 2010 23:13:15 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 May 2010 23:13:12 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 89FC22BB80F; Thu, 20 May 2010 19:13:10 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jNYGxYobdxSG; Thu, 20 May 2010 19:13:10 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 5BAB72BB816; Thu, 20 May 2010 19:13:10 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 3B407F58FA; Thu, 20 May 2010 16:13:08 -0700 (PDT) Date: Thu, 20 May 2010 23:23:00 -0000 From: Joel Brobecker To: Sergio Durigan Junior Cc: gdb-patches@sourceware.org, Jan Kratochvil Subject: Re: [PATCH] Forbid watchpoint on a constant value Message-ID: <20100520231308.GM3019@adacore.com> References: <201005181418.24324.sergiodj@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201005181418.24324.sergiodj@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00466.txt.bz2 Hi Sergio, > 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. -- Joel