(setf *step-out* nil))
(step-out ()
:report "Resume stepping after returning from this function"
- (disable-stepping)
- (setf *step-out* t)
+ (ecase *step-out*
+ ((nil)
+ (error "Can't STEP-OUT: No STEP-IN on the call-stack"))
+ ((t :maybe)
+ (disable-stepping)
+ (setf *step-out* t)))
nil)
(step-next ()
:report "Step over call"
t)))
(defun step-values (form &rest values)
- (declare (dynamic-extent values))
+ (declare (truly-dynamic-extent values))
(signal 'step-values-condition :form form :result values)
(values-list values))
(signal 'step-finished-condition)
(continue ())))
-(defvar *step-help* "The following commands are available at the single
-stepper's prompt:
-
- S: Step into the current expression.
- N: Evaluate the current expression without stepping.
- C: Evaluate to finish without stepping.
- Q: Abort evaluation.
- B: Backtrace.
- ?: Display this message.
-")
-
(defgeneric single-step (condition))
(defmethod single-step ((condition step-values-condition))
functions in question have been compiled with sufficient DEBUG policy
to be at least partially steppable."
`(locally
- (declare (optimize debug (sb-c:insert-step-conditions 0)))
- (format t "Single stepping. Type ? for help.~%")
+ (declare (optimize debug (sb-c:insert-step-conditions 0)))
+ ;; Allow stepping out of the STEP form.
(let ((*step-out* :maybe))
(unwind-protect
(with-stepping-enabled