This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Auto-deleting watchpoints


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]