Errors and Break Loops
*backtrace-on-break* is true, the stack backtrace window opens automatically when MCL enters a break loop. If the value of *backtrace-on-break* is false, you can bring up the stack backtrace window by choosing the Backtrace command from the Tools menu.The stack backtrace lists all the functions awaiting return values on the stack at the time of the error. (Note, because of tail recursion optimization, this may not be all the functions that were called.) By examining what is on the stack and comparing it to what you expect, you can often determine how the error occurred. By inspecting the function containing the error, you may be able to edit and correct the problem.

There are two tables in the Stack Backtrace window (Figure 4-6). The upper table shows you the functions pending on the stack. You can examine the stack frame of a function by selecting the function. This shows you the values of local variables active in the function, including its arguments. It also shows you any special variables that are bound within the function. You can inspect a function by double-clicking it.
The lower table shows the stack frame of the function that is selected in the upper table. The names of parameters and local variables will be shown if the corresponding function was compiled interactively if when *save-local-symbols* was true or was loaded from a fasl file that was created when *fasl-save-local-symbols* was true; otherwise automatically generated names will be used.
You can inspect an item in the lower table by double-clicking it.
In the space between the tables are three pieces of information about the frame: the number of values in the frame, the memory address of the frame, and the program counter within the function where execution has been suspended. By comparing the program counter to a disassembly of the function (available in the inspector), you can determine where in the function execution halted.
The command pop-up in the stack backtrace lets you go to the source code of a function, invoke recovery options, inspect values, and edit values.
Generated with Harlequin WebMaker