From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5869 invoked by alias); 3 May 2002 06:46:03 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5860 invoked from network); 3 May 2002 06:46:00 -0000 Received: from unknown (HELO thor.inter.net.il) (192.114.186.11) by sources.redhat.com with SMTP; 3 May 2002 06:46:00 -0000 Received: from Zaretsky ([80.230.2.40]) by thor.inter.net.il (Mirapoint Messaging Server MOS 3.1.0.54-GA) with ESMTP id ADO49129; Fri, 3 May 2002 09:45:34 +0300 (IDT) Date: Thu, 02 May 2002 23:46:00 -0000 From: "Eli Zaretskii" To: msnyder@redhat.com Message-Id: <5137-Fri03May2002094432+0300-eliz@is.elta.co.il> CC: mec@shout.net, fnf@redhat.com, gdb-patches@sources.redhat.com In-reply-to: <3CD18056.893FE00F@redhat.com> (message from Michael Snyder on Thu, 02 May 2002 11:07:18 -0700) Subject: Re: [RFA] Fix problem with watchpoint test in gdb.base/commands.exp Reply-to: Eli Zaretskii References: <3CD18056.893FE00F@redhat.com> X-SW-Source: 2002-05/txt/msg00061.txt.bz2 > Date: Thu, 02 May 2002 11:07:18 -0700 > From: Michael Snyder > > > > Btw, I think this is a misfeature: GDB should disable the watchpoints, > > but not delete them. > > Hmmm... I thought that was (effectively) what happened. > I know there's an invisible "out of scope" breakpoint sometimes, > and I thought it was that breakpoint that was deleted, not the > watchpoint itself. Was I wrong? It looks like that. Try this: - write a simple program whose `main' assigns a value to a variable; - run the program to the entry to `main', then set a hardware watchpoint to watch that variable; - continue the program, and when the watchpoint is hit, continue it again; - when `main' is exited, GDB says the watchpoint was deleted; - try "info watchpoints" -- you won't see the watchpoint; - try rerunning the program -- the watchpoint won't be hit. So my conclusion is that the watchpoint is really deleted, not just disabled and/or made invisible. For watchpoints which are hard to set up (perhaps for some complicated expression or with complex conditions), that is a nuisance.