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 Thursday 20 May 2010 20:34:49, Joel Brobecker wrote:
> > Thanks for your review.  I don't really have a strong opinion about it,
> > but your suggestion sounds pretty reasonable to me.  Since Jan is the
> > co-author of this patch, I'll wait to see what he thinks about it.
> 
> I don't have a strong opinion on it either, which is why I am interested
> in other people's thoughts on it. What was your own motivation behind
> this? I guess some user inserted a watchpoint on something constant,
> and then waited for ages for the watchpoint to trigger, thinking that
> the slowness was due to the watchpoint, not his, er... silliness :-P?

The patch was in our internal tree for a while (Jan has written the first
version of it), so I don't really know his motivations behind it.  But the
scenario you described may not be that rare :-).

FWIW, I actually was thinking a little more about the subject, and I agree
with your suggestion.  GDB may not forbid the user to do what he wants (even
if that appears to be totally non-sense).  I think a warning message, in this
case, is the best option indeed.  If Jan agrees with that, I'll submit a
refreshed version of the patch with that modification (along with the other
ones that I promised).

Thanks,

-- 
Sergio Durigan Junior
Red Hat


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