X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftoplevel.lisp;h=eddb5f88010fc503d74ab7a38179545c54a945b2;hb=4603ca100a7d181fe4316429365fc725501336dd;hp=17ff6e8b536a6e167ebf45ba202a5cb669f6aab3;hpb=1600081cf1b71b3d0e2e40de1c1c124a3a4fd40c;p=sbcl.git diff --git a/src/code/toplevel.lisp b/src/code/toplevel.lisp index 17ff6e8..eddb5f8 100644 --- a/src/code/toplevel.lisp +++ b/src/code/toplevel.lisp @@ -26,8 +26,9 @@ ;;; FIXME: These could be converted to DEFVARs. (declaim (special #!+(or x86 x86-64) *pseudo-atomic-bits* - sb!unix::*interrupts-enabled* - sb!unix::*interrupt-pending* + *allow-with-interrupts* + *interrupts-enabled* + *interrupt-pending* *type-system-initialized*)) (defvar *cold-init-complete-p*) @@ -41,11 +42,11 @@ (defun sysinit-pathname () (or (let ((sbcl-homedir (sbcl-homedir-pathname))) (when sbcl-homedir - (probe-file (merge-pathnames sbcl-homedir "sbclrc")))) + (probe-file (merge-pathnames "sbclrc" sbcl-homedir)))) #!+win32 - (merge-pathnames (sb!win32::get-folder-pathname - sb!win32::csidl_common_appdata) - "\\sbcl\\sbclrc") + (merge-pathnames "sbcl\\sbclrc" + (sb!win32::get-folder-pathname + sb!win32::csidl_common_appdata)) #!-win32 "/etc/sbclrc")) @@ -65,17 +66,6 @@ designator or a stream for the default userinit file, or NIL. If the function returns NIL, no userinit file is used unless one has been specified on the command-line.") -;;;; stepping control -(defvar *step*) -(defvar *stepping*) -(defvar *step-form-stack* nil - #!+sb-doc - "A place for single steppers to push information about -STEP-FORM-CONDITIONS avaiting the corresponding -STEP-VALUES-CONDITIONS. The system is guaranteed to empty the stack -when stepping terminates, so that it remains in sync, but doesn't -modify it in any other way: it is provided for implmentors of single -steppers to maintain contextual information.") ;;;; miscellaneous utilities for working with with TOPLEVEL @@ -581,24 +571,22 @@ that provides the REPL for the system. Assumes that *STANDARD-INPUT* and ;; most CL specials (most critically *PACKAGE*). (with-rebound-io-syntax (handler-bind ((step-condition 'invoke-stepper)) - (let ((*stepping* nil) - (*step* nil)) - (loop + (loop (/show0 "about to set up restarts in TOPLEVEL-REPL") - ;; CLHS recommends that there should always be an - ;; ABORT restart; we have this one here, and one per - ;; debugger level. - (with-simple-restart - (abort "~@") - (catch 'toplevel-catcher - #!-win32 (sb!unix::reset-signal-mask) - ;; In the event of a control-stack-exhausted-error, we - ;; should have unwound enough stack by the time we get - ;; here that this is now possible. - #!-win32 - (sb!kernel::protect-control-stack-guard-page 1) - (funcall repl-fun noprint) - (critically-unreachable "after REPL")))))))))) + ;; CLHS recommends that there should always be an + ;; ABORT restart; we have this one here, and one per + ;; debugger level. + (with-simple-restart + (abort "~@") + (catch 'toplevel-catcher + #!-win32 (sb!unix::reset-signal-mask) + ;; In the event of a control-stack-exhausted-error, we + ;; should have unwound enough stack by the time we get + ;; here that this is now possible. + #!-win32 + (sb!kernel::protect-control-stack-guard-page 1) + (funcall repl-fun noprint) + (critically-unreachable "after REPL"))))))))) ;;; Our default REPL prompt is the minimal traditional one. (defun repl-prompt-fun (stream) @@ -642,8 +630,7 @@ that provides the REPL for the system. Assumes that *STANDARD-INPUT* and (fresh-line) (prin1 result))))) ;; If we started stepping in the debugger we want to stop now. - (setf *stepping* nil - *step* nil)))) + (disable-stepping)))) ;;; a convenient way to get into the assembly-level debugger (defun %halt ()