This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: breakpoint for accessing memory location
> 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.
> Telling the user that watching "0x8000" doesn't do what they expect
> would be a nice improvement though!
Yep.