+ (format *output* "No directory on stack to pop.~%"))
+ (values))
+
+(defun pop-cmd (&optional (n 1))
+ #+ignore
+ (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
+ #+ignore
+ (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))))
+ (when *inspect-reason*
+ (throw 'inspect-quit nil))
+ (values))
+
+(defun continue-cmd (&optional (n 0))
+ (let ((restarts (compute-restarts)))
+ (if restarts
+ (if (< -1 n (length restarts))
+ (invoke-restart-interactively (nth n restarts))
+ (format *output* "~&There is no such restart"))
+ (format *output* "~&There are no restarts"))))
+
+(defun error-cmd ()
+ (print-restarts))
+
+(defun current-cmd ()
+ )
+
+(defun frame-cmd ()
+ )
+
+(defun zoom-cmd ()
+ )
+
+(defun local-cmd (&optional var)
+ (declare (ignore var))
+ )
+
+(defun processes-cmd ()
+ #+sb-thread
+ (let ((pids (thread-pids))
+ (current-pid (sb-thread:current-thread-id)))
+ (dolist (pid pids)
+ (format *output* "~&~D" pid)
+ (when (= pid current-pid)
+ (format *output* " [current listener]"))))
+ #-sb-thread
+ (format *output* "~&Threads are not supported in this version of sbcl")
+ (values))
+
+(defun kill-cmd (&rest selected-pids)
+ #+sb-thread
+ (let ((pids (thread-pids)))
+ (dolist (selected-pid selected-pids)
+ (if (find selected-pid pids :test #'eql)
+ (progn
+ (sb-thread:destroy-thread selected-pid)
+ (format *output* "~&Thread ~A destroyed" selected-pid))
+ (format *output* "~&No thread ~A exists" selected-pid))))
+ #-sb-thread
+ (declare (ignore selected-pids))
+ #-sb-thread
+ (format *output* "~&Threads are not supported in this version of sbcl")
+ (values))
+
+(defun signal-cmd (signal &rest selected-pids)
+ #+sb-thread
+ (let ((pids (thread-pids)))
+ (dolist (selected-pid selected-pids)
+ (if (find selected-pid pids :test #'eql)
+ (progn
+ (sb-unix:unix-kill selected-pid signal)
+ (format *output* "~&Signal ~A sent to thread ~A"
+ signal selected-pid))
+ (format *output* "~&No thread ~A exists" selected-pid))))
+ #-sb-thread
+ (declare (ignore signal selected-pids))
+ #-sb-thread
+ (format *output* "~&Threads are not supported in this version of sbcl")
+ (values))
+
+(defun focus-cmd (&optional process)
+ #-sb-thread
+ (declare (ignore process))
+ #+sb-thread
+ (when process
+ (format *output* "~&Focusing on next thread waiting waiting for the debugger~%"))
+ #+sb-thread
+ (progn
+ (sb-thread:release-foreground)
+ (sleep 1))
+ #-sb-thread
+ (format *output* "~&Threads are not supported in this version of sbcl")
+ (values))
+
+(defun reset-cmd ()
+ #+ignore
+ (setf *break-stack* (last *break-stack*))