Re: breakpoint for accessing memory location

Daniel Jacobowitz
2006-10-22T22:21:53Z

On Mon, Oct 23, 2006 at 12:18:50AM +0200, Eli Zaretskii wrote:
> > Date: Sun, 22 Oct 2006 08:18:53 -0400
> > From: Robert Dewar <dewar@adacore.com>
> >
> > And it would lead to surprising results, if you watch p-p and p is
> > out of scope, it would be surprising if it did NOT lead to an error!
>
> Strange, I'd actually expect GDB to tell me that "watch p-p" is an
> invalid command. Something like
>
> 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.

Telling the user that watching "0x8000" doesn't do what they expect
would be a nice improvement though!

--
Daniel Jacobowitz
CodeSourcery