Auto-deleting watchpoints
Daniel Jacobowitz
drow@mvista.com
Tue Dec 2 20:44:00 GMT 2003
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
More information about the Gdb
mailing list