This is the mail archive of the
mailing list for the GDB project.
Re: STOPPED_BY_WATCHPOINT peculiarity
- From: "Eli Zaretskii" <eliz at is dot elta dot co dot il>
- To: dje at transmeta dot com
- Cc: gdb at sources dot redhat dot com
- Date: Fri, 05 Apr 2002 14:18:07 +0300
- Subject: Re: STOPPED_BY_WATCHPOINT peculiarity
- References: <200204022154.NAA10074@casey.transmeta.com>
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
> Date: Tue, 2 Apr 2002 13:54:47 -0800
> From: Doug Evans <firstname.lastname@example.org>
> /* 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.