Sun Studio 12: Debugging a Program With dbx

Using Event Counters

An event handler has a trip counter, which has a count limit. Whenever the specified event occurs, the counter is incremented. The action associated with the handler is performed 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.

You can set the count limit using the -count modifier with a stop command, when command, or trace command (see -count n-count infinity). Otherwise, use the handler command to individually manipulate event handlers.


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