X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdebug.lisp;h=80ae5cae7642fb56c91f49c1f3df42ce042c41f9;hb=b1de52969f584c63d43fb35da4a8a6a4e0e619f0;hp=0a6cb5c731ba11217780aa76c30208eff105f68d;hpb=b08344ddbb8d0193054b72c01be7e367422ccf03;p=sbcl.git diff --git a/src/code/debug.lisp b/src/code/debug.lisp index 0a6cb5c..80ae5ca 100644 --- a/src/code/debug.lisp +++ b/src/code/debug.lisp @@ -595,7 +595,19 @@ Function and macro commands: (let ((*debugger-hook* nil)) (funcall hook condition hook)))) (sb!unix:unix-sigsetmask 0) - (let ((original-package *package*)) ; protected from WITH-STANDARD-IO-SYNTAX + + ;; Elsewhere in the system, we use the SANE-PACKAGE function for + ;; this, but here causing an exception just as we're trying to handle + ;; an exception would be confusing, so instead we use a special hack. + (unless (and (packagep *package*) + (package-name *package*)) + (setf *package* (find-package :cl-user)) + (format *error-output* + "The value of ~S was not an undeleted PACKAGE. It has been +reset to ~S." + '*package* *package*)) + (let (;; Save *PACKAGE* to protect it from WITH-STANDARD-IO-SYNTAX. + (original-package *package*)) (with-standard-io-syntax (let* ((*debug-condition* condition) (*debug-restarts* (compute-restarts condition))