Skip to content
Snippets Groups Projects
Commit a13747e0 authored by toy's avatar toy
Browse files

Better describe using :encapsulate for tracing. From rpgoldman.

parent fd4526c8
No related branches found
No related tags found
No related merge requests found
...@@ -870,7 +870,7 @@ Displays all the frames from the current to the bottom. Only shows ...@@ -870,7 +870,7 @@ Displays all the frames from the current to the bottom. Only shows
\end{Lentry} \end{Lentry}
\section{Breakpoint Commands} \section{Breakpoint Commands}\cindex{breakpoints}
\cmucl{} supports setting of breakpoints inside compiled functions and \cmucl{} supports setting of breakpoints inside compiled functions and
stepping of compiled code. Breakpoints can only be set at at known stepping of compiled code. Breakpoints can only be set at at known
...@@ -1073,7 +1073,31 @@ function entry or exit. ...@@ -1073,7 +1073,31 @@ function entry or exit.
otherwise. When encapsulation is used, forms are {\it not} otherwise. When encapsulation is used, forms are {\it not}
evaluated in the function's lexical environment, but evaluated in the function's lexical environment, but
\code{debug:arg} can still be used. \code{debug:arg} can still be used.
Note that if you trace using \kwd{encapsulate}, you will
only get a trace or breakpoint at the outermost call to the traced
function, not on recursive calls.
\end{Lentry} \end{Lentry}
In the case of functions where the known return convention is used
to optimize, encapsulation may be necessary in order to make
tracing work at all. The symptom of this occurring is an error
stating
\begin{example}
Error in function \var{foo}: :FUNCTION-END breakpoints are
currently unsupported for the known return convention.
\end{example}
in such cases we recommend using \code{(trace \var{foo} :encapsulate
t)}
\cpsubindex{tracing}{errors}
\cpsubindex{breakpoints}{errors}
\cpsubindex{errors}{breakpoints}
\cindex{function-end breakpoints}
\cpsubindex{breakpoints}{function-end}
\kwd{condition}, \kwd{break} and \kwd{print} forms are evaluated in \kwd{condition}, \kwd{break} and \kwd{print} forms are evaluated in
the lexical environment of the called function; \code{debug:var} and the lexical environment of the called function; \code{debug:var} and
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment