gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gdb] Watchpoints on local variables should not be auto-deleted


From: Mihai Basa
Subject: [Gdb] Watchpoints on local variables should not be auto-deleted
Date: Thu, 30 Oct 2003 14:46:32 +0000

Deep bows to all the gdb developers!

I'd like to question a certain behaviour of gdb, and I quote from the manual:

   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 (sqrt() springs to mind). I believe this auto-deletion 
_severly_ reduces the usefulness of watchpoints (and gdb :( ), because they 
simply go away on the first call they hit.

I am not totally sure about the way hardware watchpoints behave when the 
processor switches Code-Segments, but couldn't gdb at least re-enable the 
watchpoint when it re-enters scope? Would there be any bad side-effect to this 
that I can't see?


Highest regards,
Mihai Basa






reply via email to

[Prev in Thread] Current Thread [Next in Thread]