STOPPED_BY_WATCHPOINT peculiarity
Eli Zaretskii
eliz@is.elta.co.il
Fri Apr 5 03:22:00 GMT 2002
> Date: Tue, 2 Apr 2002 13:54:47 -0800
> From: Doug Evans <dje@transmeta.com>
>
> /* It may be possible to simply continue after a watchpoint. */
> if (HAVE_CONTINUABLE_WATCHPOINT)
> STOPPED_BY_WATCHPOINT (ecs->ws);
>
> STOPPED_BY_WATCHPOINT is a predicate.
> Therefore at first glance this code is pointless.
Who said predicates cannot have side effects?
Anyway, this code is there in GDB for as long as I can remember.
Presumably, it's a survivor from the days when watchpoints were added
to GDB for Sparclet or some such.
I don't mind the extra comment, though. My only request is to change
the wording of the comment so that the kind of use in i386-nat.c is an
example of how it could be used, not the original purpose of this code
(which is unknown to me). IMHO, the comment should serve as a warning
against the temptation of removing it, or otherwise rewriting it in
ways that could break ecisting usage.
Thanks.
More information about the Gdb
mailing list