From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Eli Zaretskii , edwardp@excitehome.net Cc: gdb@sources.redhat.com Subject: Re: watchpoints inside 'commands' Date: Tue, 17 Apr 2001 10:38:00 -0000 Message-id: <3ADC6157.DB626F4D@cygnus.com> References: <20010405200028.A18474@excitehome.net> <20010405200525.A18623@excitehome.net> <200104060909.FAA18637@indy.delorie.com> <20010406111945.A19540@excitehome.net> <200104070717.DAA01977@indy.delorie.com> <20010407173341.A22145@excitehome.net> <200104080808.EAA01801@delorie.com> X-SW-Source: 2001-04/msg00118.html > > 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