Re: breakpoint for accessing memory location

Robert Dewar
2006-10-22T22:48:32Z

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 guess we have very different notions of what is reasonable in this
> context.

indeed!

I have no idea why you would think this is invalid, i.e. what the
general semantic rule is that makes this expression invalid.