This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: breakpoint for accessing memory location
On Tue, Oct 24, 2006 at 06:32:08AM +0200, Eli Zaretskii wrote:
> > If I set a watchpoint on b at '/* X */', then that watchpoint should
> > be deleted at soon as we leave the local block in which it is
> > defined.
>
> Does the debug info tell us enough to do that?
Sometimes, but not reliably. We delete out of scope watchpoints partly
by setting an appropriate breakpoint at the function return address,
and there is no equivalent exit address for nested scopes.
Another problem with watchpoints is that we don't support any kind of
location lists for local variables; that's a similar problem.
--
Daniel Jacobowitz
CodeSourcery