This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Auto-deleting watchpoints
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Mihai Basa <Mihai dot Basa at NUIGALWAY dot IE>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 2 Dec 2003 15:44:51 -0500
- Subject: Re: Auto-deleting watchpoints
- References: <3FCC0BA0@bodkin.nuigalway.ie>
On Tue, Dec 02, 2003 at 08:40:23PM +0000, Mihai Basa wrote:
> 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!
That is not what is supposed to happen. The watchpoint should stay
until the function containing the local variable has exited. If you
have a testcase where that doesn't work, file a bug report (and try the
latest version of GDB), please.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer