This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: breakpoint for accessing memory location
> Date: Sat, 21 Oct 2006 18:32:00 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: rodney.bates@wichita.edu, gdb@sourceware.org
> >
> > So you are saying that "watch p - p" will also cause an error message
> > when p goes out of scope?
>
> Well, I just tried it; that's what I'd expect, and it seems to be what
> happens, also.
That's silly, IMHO. Don't you think we should be smarter? Perhaps
some kind of expression optimizer could be devised to do better.