Events

Related Topics:

Event Specification Predefined Events

When an event occurs, dbx allows you to stop a process, execute arbitrary commands, or print information. The simplest example of an event is a breakpoint. Examples of other events are faults, signals, system calls, calls to dlopen(), and watchpoints.

The following commands create handlers for events, each with a specific side-effect:
stop eventspec Stop and prompt the user when the specified event occurs
when eventspec { command ; [ ... ] } Execute commands when specified event occurs
trace eventspec Print a trace of the specified event.

For a complete list of events, their definitions and the eventspec syntax accepted by the stop, when and trace commands, see Event Specification.

The above commands return the ID of the handler they create, hid. The ID can be used in the following commands. all can usually be substituted for hid.
status [ hid ] List the specified handler; all, if none specified.
handler -disable hid Disable the specified handler.
handler -enable hid Enable the specified handler.
handler -reset hid Reset hid's counter (see Event Specification).
delete hid Delete the specified handler.
clear lineno Delete any handler on the specified line.
clear Shorthand for clear $lineno.