X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fcold-init.lisp;h=808224e2c4f871653099e0eb9b1f25ac46f8b54a;hb=9c3a9502bc872f024c365412d991ef43fd866e4c;hp=c343f4a51cb00415a359b1611c66e94c8760f81e;hpb=dd54f9e004a0a83d1328e94648f48dcc27e0be5b;p=sbcl.git diff --git a/src/code/cold-init.lisp b/src/code/cold-init.lisp index c343f4a..808224e 100644 --- a/src/code/cold-init.lisp +++ b/src/code/cold-init.lisp @@ -230,7 +230,8 @@ (show-and-call stream-cold-init-or-reset) (show-and-call !loader-cold-init) (show-and-call !foreign-cold-init) - #!-win32 (show-and-call signal-cold-init-or-reinit) + #!-(and win32 (not sb-thread)) + (show-and-call signal-cold-init-or-reinit) (/show0 "enabling internal errors") (setf (sb!alien:extern-alien "internal_errors_enabled" boolean) t) @@ -348,10 +349,11 @@ process to continue normally." (setf sb!alien::*default-c-string-external-format* nil) ;; WITHOUT-GCING implies WITHOUT-INTERRUPTS. (without-gcing + ;; Initialize streams first, so that any errors can be printed later + (stream-reinit t) (os-cold-init-or-reinit) (thread-init-or-reinit) - (stream-reinit t) - #!-win32 + #!-(and win32 (not sb-thread)) (signal-cold-init-or-reinit) (setf (sb!alien:extern-alien "internal_errors_enabled" boolean) t) (float-cold-init-or-reinit)) @@ -372,20 +374,21 @@ process to continue normally." #!+sb-show (defun hexstr (thing) (/noshow0 "entering HEXSTR") - (let ((addr (get-lisp-obj-address thing)) - (str (make-string 10 :element-type 'base-char))) + (let* ((addr (get-lisp-obj-address thing)) + (nchars (* sb!vm:n-word-bytes 2)) + (str (make-string (+ nchars 2) :element-type 'base-char))) (/noshow0 "ADDR and STR calculated") (setf (char str 0) #\0 (char str 1) #\x) (/noshow0 "CHARs 0 and 1 set") - (dotimes (i 8) + (dotimes (i nchars) (/noshow0 "at head of DOTIMES loop") (let* ((nibble (ldb (byte 4 0) addr)) (chr (char "0123456789abcdef" nibble))) (declare (type (unsigned-byte 4) nibble) (base-char chr)) (/noshow0 "NIBBLE and CHR calculated") - (setf (char str (- 9 i)) chr + (setf (char str (- (1+ nchars) i)) chr addr (ash addr -4)))) str)) @@ -405,6 +408,6 @@ process to continue normally." (%cold-print (car obj) d) (%cold-print (cdr obj) d))) (t - (sb!sys:%primitive print (hexstr x))))))) + (sb!sys:%primitive print (hexstr obj))))))) (%cold-print x 0)) - (values)) \ No newline at end of file + (values))