+(defun pop-cmd (&optional (n 1))
+ (let ((new-level (- (length *break-stack*) n 1)))
+ (when (minusp new-level)
+ (setq new-level 0))
+ (dotimes (i (- (length *break-stack*) new-level 1))
+ (pop *break-stack*)))
+ ;; Find inspector
+ (do* ((i (1- (length *break-stack*)) (1- i))
+ (found nil))
+ ((or found (minusp i)))
+ (let ((inspect (break-data-inspect (nth i *break-stack*))))
+ (when inspect
+ (set-current-inspect inspect)
+ (setq found t))))
+ (values))
+
+(defun continue-cmd (n)
+ (let ((restarts (break-data-restarts (car *break-stack*))))
+ (if restarts
+ (if (< -1 n (length restarts))
+ (progn
+ (invoke-restart-interactively (nth n restarts))
+ )
+ (format *repl-output* "~&There is no such restart"))
+ (format *repl-output* "~&There are no restarts"))))
+
+(defun error-cmd ()
+ )
+
+(defun current-cmd ()
+ )
+
+(defun frame-cmd ()
+ )
+
+(defun processes-cmd ()
+ #+sb-thread
+ (let ((pids (thread-pids))
+ (current-pid (sb-thread:current-thread-id)))
+ (dolist (pid pids)
+ (format *repl-output* "~&~D" pid)
+ (when (= pid current-pid)
+ (format *repl-output* " [current listener]"))))
+ #-sb-thread
+ (format *repl-output* "~&Threads are not supported in this version of sbcl")
+ (values))
+
+(defun kill-cmd (selected-pid)
+ #+sb-thread
+ (let ((pids (thread-pids)))
+ (if (find selected-pid pids :test #'eql)
+ (progn
+ (sb-thread:destroy-thread selected-pid)
+ (format *repl-output* "Thread ~D destroyed" selected-pid))
+ (format *repl-output* "No thread ~D exists" selected-pid)))
+ #-sb-thread
+ (declare (ignore selected-pid))
+ #-sb-thread
+ (format *repl-output* "~&Threads are not supported in this version of sbcl")
+ (values))
+
+(defun reset-cmd ()
+ (setf *break-stack* (last *break-stack*))
+ (values))
+
+(defun dirs-cmd ()