[rfa:breakpoint] Correctly count watchpoints

Andrew Cagney ac131313@redhat.com
Sun Sep 29 20:34:00 GMT 2002


Hello,

The attached modifies breakpoint.c so that (I think) it correctly counts 
the number of watchpoint resources in use.

(per earlier post) An expression like:

	a + b

requires two watchpoint resources (&a and &b).  When first creating the 
watchpoint, gdb correctly counts this as two.  However,  when GDB goes 
back to compute the number of watchpoints already used, it does a 
re-count and treats the above (and any watchpoint expression) as only one.

The attached, I belive, fixes this by saving the mem_cnt that was computed.

One thing I wonder about though, should ``info breakpoints'' or ``maint 
info breakpoints'' display this info?

Ok?
Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20020929/552c67c1/attachment.ksh>


More information about the Gdb-patches mailing list