From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16131 invoked by alias); 3 Dec 2007 18:11:38 -0000 Received: (qmail 15887 invoked by uid 22791); 3 Dec 2007 18:11:37 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 03 Dec 2007 18:11:23 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 1DC5C9833F for ; Mon, 3 Dec 2007 18:11:21 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id EF48298258 for ; Mon, 3 Dec 2007 18:11:20 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1IzFlH-0007kP-MM for gdb@sourceware.org; Mon, 03 Dec 2007 13:11:19 -0500 Date: Mon, 03 Dec 2007 18:11:00 -0000 From: Daniel Jacobowitz To: gdb@sourceware.org Subject: Re: Watchpoints with condition Message-ID: <20071203181119.GA29764@caradoc.them.org> Mail-Followup-To: gdb@sourceware.org References: <200711301925.20196.vladimir@codesourcery.com> <20071130234853.GA27583@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00012.txt.bz2 On Mon, Dec 03, 2007 at 09:54:41AM -0800, Jim Blandy wrote: > Okay, so 'watch foo if foo == 1' has some interesting behavior: > - if foo is 1 when the watchpoint is set, then the watchpoint doesn't > trigger until foo becomes != 1, and then becomes 1 again. > - If foo is != 1 when the watchpoint is set, then the command is > equivalent to watch foo == 1. No. When foo goes back to zero, "watch foo == 1" stops. "watch foo if foo == 1" does not. -- Daniel Jacobowitz CodeSourcery