watchpoints inside 'commands'

Andrew Cagney ac131313@cygnus.com
Tue Apr 17 10:38:00 GMT 2001


> > Now, I don't want to have the watchpoint stop all of those 40,000
> > times; I only want it to stop if something else trounces the memory
> > that I don't know about.
> 
> Ah, okay, then how about setting a breakpoint near the exit from the
> scope where the watchpoint is defined, and setting up the commands of
> that breakpoint to silently delete the watchpoint and continue?  Would
> that do what you want?

Just FYI, I've this memory of GDB (or is it insight) doing something for
some cases already.  GDB quietly sets a breakpoint on the function's
exit code so that it can zap certain tempoary breakpoints when the
function exits.

There may well be a case for making the behavour consistent (however
standard disclaimer about this being my vague memory).

	Andrew



More information about the Gdb mailing list