All Manuals > LispWorks® User Guide and Reference Manual > 34 The DBG Package

remote-debugging-connection-add-close-cleanup

remote-debugging-connection-remove-close-cleanup Functions

Summary

Add or remove a function that is called when a remote debugging connection is closed.

Package

dbg

Signatures

remote-debugging-connection-add-close-cleanup connection function => changed-p

remote-debugging-connection-remove-close-cleanup connection function => changed-p

Arguments
connection
function
A function designator or a list whose car is a function designator.
Values
changed-p
Boolean.
Description

The function remote-debugging-connection-add-close-cleanup records function as a cleanup in connection. When connection is closed, for whatever reason, each recorded function is invoked (by funcall for a function or symbol, or by applying the car to the cdr for a list). function is added only if it is not already in the list (tested by equal).

The function remote-debugging-connection-remove-close-cleanup removes function from the cleanups if it was already added (tested by equal).

changed-p is t if the cleanups were modified and nil otherwise.

Both functions may be called on either side (IDE or client).

Notes

You should not assume anything about the order of calls to the cleanup functions.

Unhandled errors during the call to function are handled and reported to the log-stream of the connection.

remote-debugging-connection-remove-close-cleanup is needed when you repeatedly create some objects that do not live for long but you still want cleanups for them. In this situation, the cleanup list would grow indefinitely unless you call remote-debugging-connection-remove-close-cleanup when an object is discarded.

See also

3.7 Remote debugging
close-remote-debugging-connection


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:32