[slime-devel] restart frame, return from frame

Wolfgang Jenkner wjenkner at inode.at
Sun Jan 18 19:30:57 UTC 2004


Alan Ruttenberg <alanralanr at comcast.net> writes:

> sldb-return-from-frame: "reads an expression in the minibuffer and
> causes the function to return that value, evaluated in the context of
> the frame"
>
> sldb-restart-frame:  "causes the frame to restart execution with the
> same arguments as it was called originally"
>
> You can use these functions in an sldb buffer with cursor on the frame
> you want to restart or return from.
>
> Does this functionality exist in other lisps?

CLISP has (SYS::RETURN-FROM-EVAL-FRAME framepointer form)

which unwinds to the EVAL/APPLY frame given by FRAMEPOINTER and
returns as values of this frame the values of evaluating FORM
(translated from the German comment in src/debug.d).

So it might be enough to do

(defslimefun sldb-return-from-frame (form index)
  (sys::return-from-eval-frame (nth-frame index) (from-string form)))

The corresponding function in the native break loop is debug-return
(in src/reploop.lisp).

Similarly, CLISP has (SYS::REDO-EVAL-FRAME framepointer), which
unwinds to the EVAL/APPLY frame given by FRAMEPOINTER and reprocesses
it (from src/debug.d).

Wolfgang





More information about the slime-devel mailing list