Since there is no standard way to track local functions, the way I ran into the problem is to write a tracing-labels macro that implements tracing by converting the following:
(defun foo (x) (tracing-labels ((bar (y) (format t "bar: ~a~&" y))) (bar x)))
into something like this:
(defun foo (x) (labels ((bar (y) (format *trace-output* "~&ENTER: ~S" 'bar) ;' (multiple-value-prog1 (progn (format t "bar: ~a~&" y)) (format *trace-output* "~&LEAVE: ~S" 'bar)))) ;' (bar x)))
source share