A breakpoint represents a function the system calls with the current frame when execution passes a certain code-location. A break point is active or inactive independent of its existence. They also have an extra slot for users to tag the breakpoint with information.
[Function]
make-breakpoint hook-function what &key :kind :info
:function-end-cookie
This function creates and returns a breakpoint. When program execution encounters the breakpoint, the system calls hook-function. hook-function takes the current frame for the function in which the program is running and the breakpoint object.
what and kind determine where in a function the system invokes hook-function. what is either a code-location or a debug-function. kind is one of :code-location, :function-start, or :function-end. Since the starts and ends of functions may not have code-locations representing them, designate these places by supplying what as a debug-function and kind indicating the :function-start or :function-end. When what is a debug-function and kind is :function-end, then hook-function must take two additional arguments, a list of values returned by the function and a function-end-cookie.
info is information supplied by and used by the user.
function-end-cookie is a function. To implement function-end breakpoints, the system uses starter breakpoints to establish the function-end breakpoint for each invocation of the function. Upon each entry, the system creates a unique cookie to identify the invocation, and when the user supplies a function for this argument, the system invokes it on the cookie. The system later invokes the function-end breakpoint hook on the same cookie. The user may save the cookie when passed to the function-end-cookie function for later comparison in the hook function.
This signals an error if what is an unknown code-location.
ıNote: Breakpoints in interpreted code or byte-compiled code are not implemented. Function-end breakpoints are not implemented for compiled functions that use the known local return convention (e.g. for block-compiled or self-recursive functions.)
[Function]
activate-breakpoint breakpoint
This function causes the system to invoke the breakpoint's hook-function until the next call to deactivate-breakpoint or delete-breakpoint. The system invokes breakpoint hook functions in the opposite order that you activate them.
[Function]
deactivate-breakpoint breakpoint
This function stops the system from invoking the breakpoint's hook-function.
[Function]
breakpoint-active-p breakpoint
This returns whether breakpoint is currently active.
[Function]
breakpoint-hook-function breakpoint
This function returns the breakpoint's function the system calls when execution encounters breakpoint, and it is active. This is SETF'able.
[Function]
breakpoint-info breakpoint
This function returns breakpoint's information supplied by the user. This is SETF'able.
[Function]
breakpoint-kind breakpoint
This function returns the breakpoint's kind specification.
[Function]
breakpoint-what breakpoint
This function returns the breakpoint's what specification.
[Function]
delete-breakpoint breakpoint
This function frees system storage and removes computational overhead associated with breakpoint. After calling this, breakpoint is useless and can never become active again.