All Manuals > LispWorks User Guide and Reference Manual > 5 The Trace Facility

NextPrevUpTopContentsIndex

5.5 Tracing subfunctions

Subfunctions are functions that are defined inside the body of other functions rather than by top level definers like defun, defmethod, etc. To trace such a subfunction, call trace with a "subfunction dspec" in one of these forms:

See Subfunction dspecs for details. All of the keywords that trace takes have the same effect for subfunction tracing.

The behavior when tracing a subfunction is somewhat different from tracing other function.

Tracing of subfunction works only for compiled functions.

5.5.1 Notes on subfunction names

Anonymous lambdas are named by the compiler using integers.

You can find the dspec of a given subfunction by calling object-dspec on the subfunction. You can also construct it from the printed representation of the subfunction, which contains the sub-name and the parent-dspec.

A subfunction can be given an name using a hcl:lambda-name declaration (see declare). If this is of the form (subfunction sub-name), then the dspec of the subfunction will contain both sub-name and the correct parent-dspec. However, if it has any other form, then dspec will be that name and you will need to know the parent-dspec in order to construct the subfunction dspec.


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex