This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Forbid watchpoint on a constant value
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Sergio Durigan Junior <sergiodj at redhat dot com>, gdb-patches at sourceware dot org
- Date: Fri, 4 Jun 2010 15:53:23 +0200
- Subject: Re: [PATCH] Forbid watchpoint on a constant value
- References: <20100521070500.GA30452@host0.dyn.jankratochvil.net> <email@example.com> <firstname.lastname@example.org> <20100528231122.GO3019@adacore.com>
On Sat, 29 May 2010 01:11:22 +0200, Joel Brobecker wrote:
> > +/* This checks if each element of EXP is not a
> > + constant expression for a watchpoint.
> > +
> > + Returns 1 if EXP is constant, 0 otherwise. */
> /* Return non-zero iff EXP is an expression whose value can never change. */
The former comment was vague enough I agreed with it. But the new one is
explicit enough to be unfortunately IMO incorrect.
Return non-zero if EXP is verified as constant. Returned zero means EXP is
variable. Also the constant detection may fail for some constant
expressions and in such case still falsely return zero.
OK this way?