Debugging a Program With dbx

Using Event Counters

Event handlers have trip counters. There is a count limit and the actual counter. Whenever the event occurs, the counter is incremented. The action associated with the handler executes only if the count reaches the limit, at which point the counter is automatically reset to 0. The default limit is 1. Whenever a process is rerun, all event counters are reset.

The count limit can be set using the -count modifier. Otherwise, use the handler command to individually manipulate event handlers:


handler [ -count | -reset ] hid new-count
 new-count-limit