Re: [rfc] Allow watchpoints on inaccessible memory

Daniel Jacobowitz
2007-08-21T18:06:36Z

On Tue, Aug 21, 2007 at 09:33:28AM -0700, Jim Blandy wrote:
> One thing I don't understand: why are the "always watch the outermost
> value even if it is lazy" changes needed? The code that evaluates the
> watchpoint condition should always simply unlazy the expression's
> final value to begin with, so it'll never be lazy by the time the
> other code sees it.

But that might fail. That's why I switched from value_fetch_lazy to
gdb_value_fetch_lazy, which catches exceptiosn. Consider "watch *0";
evaluating the expression works fine, but fetching the result of
evaluate_expression will call memory_error. We still want to set
the watchpoint.

--
Daniel Jacobowitz
CodeSourcery