Re: breakpoint for accessing memory location

Daniel Jacobowitz
2006-10-22T23:18:53Z

On Mon, Oct 23, 2006 at 12:28:57AM +0200, Eli Zaretskii wrote:
> > Date: Sun, 22 Oct 2006 18:21:43 -0400
> > From: Daniel Jacobowitz <drow@false.org>
> > Cc: Robert Dewar <dewar@adacore.com>, rodney.bates@wichita.edu,
> > gdb@sourceware.org
> >
> > > Warning: attempt to watch constant expression.
> >
> > I think that would be a useful warning, but that we shouldn't go to the
> > trouble of making it catch things like "p-p" where you would need an
> > optimizer to figure it out.
>
> Trouble? what trouble? Just sample the value of the expression for
> several random values of the variables, and if the value doesn't
> change, consider it constant.

Was this sarcasm? If not, please consider "watch p != 42" for a couple
of random values of p.

--
Daniel Jacobowitz
CodeSourcery