This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Forbid watchpoint on a constant value


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?


Thanks,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]