I have been using the SLIME debugger extensively with CMUCL and ALlegro 6.0. I find the SLIME debugger to be a big improvement over the "native" Lisp debuggers. One of the biggest improvements is having a uniform debugger and inspector interface for the different Lisps.
Here is my question:
In Allegro, with
(declaim (optimize (safety 3)(space 1)(speed 2)(debug 2)))
I find that most of the local variables are available in the SLIME debugger, but that the variable names are lost. The debugger prints something like:
13: ((METHOD INTERSECT-CURVE-WITH-DTM ...) Locals: TERRAIN-MODEL = #<NON-LINEAR-MAPPED-REGULAR-GRID-TERRAIN-MODEL @ #x2059e39a> CURVE-FN = #<Closure (:INTERNAL (METHOD INTERSECT-CAMERA-RAY-WITH-TERRAIN-MODEL ...))> S0 = 1.0 SEMI-INFINITE-P = T SYSTEM-TOOL::START = T
EXCL::|local-0| = ... EXCL::|local-1| = ... EXCL::|local-2| = ... ...
I tried (debug 3), but that didn't appear to help. Is this because the symbol names are not available, or because the debugger cannot figure out the assiciation between the stack locations and the local variables?
In CMUCL with
(declaim (optimize (safety 3)(space 1)(speed 2)(debug 9/4)))
I find that most local variable values print as :<NOT-AVAILABLE> in the SLIME debugger. The debugger prints something like:
10: ((METHOD CME::INTERSECT-CURVE-WITH-DTM ...) Locals: PCL::.KEY. = :<NOT-AVAILABLE> PCL::.PV-CELL. = (#(1 2) . #()) PCL::.PV. = :<NOT-AVAILABLE> PCL::.REST-ARG. = (:SEMI-INFINITE-P T) PCL::.SLOTS0. = :<NOT-AVAILABLE> CURVE-FN = #<Closure Over Function "DEFMETHOD INTERSECT-CAMERA-RAY-WITH-TERRAIN-MODEL ...> DEFAULT-Z = :<NOT-AVAILABLE> DTM-TO-LVCS-TRANSFORM = :<NOT-AVAILABLE> FUNCTION = :<NOT-AVAILABLE>
I tried:
(declaim (optimize (safety 3)(space 0)(speed 0)(debug 3))),
but that didn't appear to help. What is the problem?
Lynn Quam quam@ai.sri.com writes:
I tried (debug 3), but that didn't appear to help. Is this because the symbol names are not available, or because the debugger cannot figure out the assiciation between the stack locations and the local variables?
I don't know, and I'd like too know too. Franz' documentations says explicitly that names of variables are recorded with (debug 3). But it seems to me that Allegro's native debugger also shows EXCL::|local-2| etc. So, it I think its not a SLIME specific problem.
DTM-TO-LVCS-TRANSFORM = :<NOT-AVAILABLE> FUNCTION = :<NOT-AVAILABLE>
I tried:
(declaim (optimize (safety 3)(space 0)(speed 0)(debug 3))),
but that didn't appear to help. What is the problem?
No idea :( On possibility is that those variables are not yet initialized. The CMUCL manual says:
(debug 3): Level 2 plus all uninterned variables. In addition, lifetime analysis is disabled (even when speed is 3), ensuring that all variable values are available at any known location within the scope of the binding. This has a speed penalty in addition to the obvious space penalty.
Perhaps those variables are no longer "in scope". Or the compiler doesn't do what the documentation says.
In such situations I often switch to the interpreter. Usually, all local variables are available in interpreted code. Of course, CMUCL's interpreter is so slow, that it is often not feasible use it. It would be nice if CMUCL had a switch to disable _all_ optimizations but still compile to native code.
Helmut.