Re: [PING][RFA-v2] Fix troubles with watchpoints in DJGPP

DJ Delorie
2009-06-17T22:44:56Z

> > /* If the user sets watchpoints before execution having started,
> > then she gets software watchpoints, because GDB can't know which
> > target will end up being pushed, or if it supports hardware
> > watchpoints or not. breakpoint_re_set takes care of promoting
> > watchpoints to hardware watchpoints if possible, however, if this
> > new inferior doesn't load shared libraries or we don't pull in
> > symbols from any other source on this target/arch,
> > breakpoint_re_set is never called. Call it now so that software
> > watchpoints get a chance to be promoted to hardware watchpoints
> > if the now pushed target supports hardware watchpoints. */
> > breakpoint_re_set ();
>
> Best Comment Of The Year Award! I love comments like these.

Agreed. I tell people I'm mentoring, comments should explain *why*,
the code already says *what*. This is an excellent example of that.