This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: breakpoint for accessing memory location


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]