Debugger commands support hooks. A command hook is executed just before the interpreter invokes the hooked command.
There are two hooks allowed for every command. By convention, one hook is for use by users, the other is for use by the application.
A user hook is created for a command XYZZY by using
define-command
to create a command called hook-XYZZY
.
An application hook is created for a command XYZZY by using
define-command
to create a command called apphook-XYZZY
.
Application hooks are useful for interfaces which wish to continuously monitor certain aspects of debugger state. The application can set a hook on all commands that might modify the watched state. When the hook is executed, it can use i/o redirection to notify parts of the application that previous data may be out of date. After the top-level loop resumes, the application can recompute any values that may have changed. (See section How the Server's I/O Can be Used.)
Go to the first, previous, next, last section, table of contents.