X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fstep.lisp;h=43a4801383b14b684a363d5e48f9883528e988de;hb=d442c23da9851beac541b8bddfc2c0837cb87309;hp=8d1affe735edf5294bc264e7ed1e31df2fd9e7e8;hpb=6fedcdf1b31e40855fec7845d8bce5ad8beeaaf1;p=sbcl.git diff --git a/src/code/step.lisp b/src/code/step.lisp index 8d1affe..43a4801 100644 --- a/src/code/step.lisp +++ b/src/code/step.lisp @@ -26,8 +26,12 @@ (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" @@ -37,7 +41,7 @@ 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)) @@ -46,17 +50,6 @@ (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)) @@ -105,8 +98,8 @@ outside the lexical scope of the form can be stepped into only if the 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