From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3412 invoked by alias); 2 Dec 2003 20:38:35 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 3385 invoked from network); 2 Dec 2003 20:38:34 -0000 Received: from unknown (HELO BODKIN.NUIGALWAY.IE) (140.203.7.16) by sources.redhat.com with SMTP; 2 Dec 2003 20:38:34 -0000 Received: from CONVERSION-DAEMON.bodkin.nuigalway.ie by bodkin.nuigalway.ie (PMDF V6.2-X17 #30588) id <01L3QF4FOCAO0000ZV@bodkin.nuigalway.ie> for gdb@sources.redhat.com; Tue, 02 Dec 2003 20:37:23 +0000 (GMT) Received: from bodkin.nuigalway.ie (emu1.nuigalway.ie [140.203.7.53]) by bodkin.nuigalway.ie (PMDF V6.2-X17 #30588) with ESMTP id <01L3QF4FJQJG0003OZ@bodkin.nuigalway.ie> for gdb@sources.redhat.com; Tue, 02 Dec 2003 20:37:23 +0000 (GMT) Date: Tue, 02 Dec 2003 20:38:00 -0000 From: Mihai Basa Subject: Auto-deleting watchpoints To: gdb@sources.redhat.com Message-id: <3FCC0BA0@bodkin.nuigalway.ie> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-WebMail-UserID: 02148200 X-EXP32-SerialNo: 00003610 X-SW-Source: 2003-12/txt/msg00024.txt.bz2 Greetings all! I'd like to question a certain behaviour of gdb, and I quote from the man(ual): "GDB automatically deletes watchpoints that watch local (automatic) variables, or expressions that involve such variables, when they go out of scope, that is, when the execution leaves the block in which these variables were defined." This includes deleting local watchpoints even when the program makes a call to a library function (say, sqrt()). I believe this auto-deletion _severly_ reduces the practicality of watchpoints, because they simply go away on the first call they hit! I am not totally aware about the way hardware watchpoints behave when the processor switches Code-Segments (which is what happens?), but couldn't gdb at least re-enable the watchpoint when it re-enters scope? Is there a bad side-effect to this that I can't see? Highest regards! Mihai Basa