From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5912 invoked by alias); 4 Dec 2007 07:25:32 -0000 Received: (qmail 5876 invoked by uid 22791); 4 Dec 2007 07:25:31 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 04 Dec 2007 07:25:22 +0000 Received: (qmail 12308 invoked from network); 4 Dec 2007 07:25:20 -0000 Received: from unknown (HELO 172.16.unknown.plus.ru) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 4 Dec 2007 07:25:20 -0000 From: Vladimir Prus To: Michael Snyder Subject: Re: Watchpoints with condition Date: Tue, 04 Dec 2007 07:25:00 -0000 User-Agent: KMail/1.9.6 Cc: gdb@sources.redhat.com References: <200711301925.20196.vladimir@codesourcery.com> <1196733050.2501.200.camel@localhost.localdomain> In-Reply-To: <1196733050.2501.200.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200712041025.15416.vladimir@codesourcery.com> 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/msg00021.txt.bz2 On Tuesday 04 December 2007 04:50:50 Michael Snyder wrote: > On Fri, 2007-11-30 at 19:25 +0300, Vladimir Prus wrote: > > GDB presently allow a watchpoint to have a condition, and I wonder > > what are the use-cases for that. > > > > If anybody has used watchpoint in condition in practice when debugging > > real problem (as opposed to just playing with gdb, or making up > > possible uses), can he share why it was needed? > > > May I ask, what prompts the question? > Were you thinking of getting rid of it? I'm merely trying to understand the use cases. One of the specific concern is what happens if a watchpoint's condition refers to a global variable in a library that is unloaded and if that scenario is of interest to anybody. - Volodya