breakpoints/1977: Hardware watchpoints can not be deleted, only disabled
Tue Jul 26 19:48:00 GMT 2005

>Number:         1977
>Category:       breakpoints
>Synopsis:       Hardware watchpoints can not be deleted, only disabled
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 26 19:48:00 UTC 2005
>Release:        6.3, GNU gdb
Linux 32bit x86
watchpoint debugging fails when trying to define and delete many watchpoints during a gdb session.

gdb doesn't appear to actually delete the watchpoints. e.g. watch/breakpoint numbers aren't reused, e.g. after defining but having deleted most of the watchpoints it fails because it appears to erroneously maintain the defined set of watchpoints.

Saw this trying to debug a memory overun error where I need to drive the creation of watchpoints by driving gdb through mi.  Then recreated it using the cli to confirm the behavior.

Serious because it has a major impact in the ability to use watchpoints during a debugging session.
Create say 20 watchpoints, delete all but the last one which should leave one watchpoint.  Resume execution...  gdb fails and complains about too many hardware watchpoints.  

Alternately, repeat the following process 20 times, create a watchpoint and delete it. (net balance of zero watchpoints)  Finally create a watchpoint.  (net balance of one watchpoint)  Similar failure to above.


More information about the Gdb-prs mailing list