;;; indicates that that a slot is unbound.
(defvar *inspect-unbound-object-marker* (gensym "INSPECT-UNBOUND-OBJECT-"))
;;; indicates that that a slot is unbound.
(defvar *inspect-unbound-object-marker* (gensym "INSPECT-UNBOUND-OBJECT-"))
(multiple-value-bind (description named-p elements)
(inspected-parts *inspected*)
(tty-display-inspected-parts description named-p elements s)
(named-let reread ()
(format s "~&> ")
(force-output)
(multiple-value-bind (description named-p elements)
(inspected-parts *inspected*)
(tty-display-inspected-parts description named-p elements s)
(named-let reread ()
(format s "~&> ")
(force-output)
- (let (;; KMP idiom, using stream itself as EOF value
- (command (read *standard-input* nil *standard-input*)))
- (typecase command
- (stream ; i.e. EOF
+ (let* (;; newly-consed object for hermetic protection against
+ ;; mischievous input like #.*EOF-OBJECT*:
+ (eof (cons *eof-object* nil))
+ (command (read *standard-input* nil eof)))
+ (when (eq command eof)
;; currently-undocumented feature: EOF is handled as Q.
;; If there's ever consensus that this is *the* right
;; thing to do (as opposed to e.g. handling it as U), we
;; could document it. Meanwhile, it seems more Unix-y to
;; do this than to signal an error.
;; currently-undocumented feature: EOF is handled as Q.
;; If there's ever consensus that this is *the* right
;; thing to do (as opposed to e.g. handling it as U), we
;; could document it. Meanwhile, it seems more Unix-y to
;; do this than to signal an error.
(= elements-length 1) (1- elements-length))
(return-from %inspect (reread))))))
(symbol
(case (find-symbol (symbol-name command) *keyword-package*)
((:q :e)
(= elements-length 1) (1- elements-length))
(return-from %inspect (reread))))))
(symbol
(case (find-symbol (symbol-name command) *keyword-package*)
((:q :e)
(info (layout-info (sb-kernel:layout-of object))))
(when (sb-kernel::defstruct-description-p info)
(dolist (dd-slot (dd-slots info) (nreverse parts-list))
(info (layout-info (sb-kernel:layout-of object))))
(when (sb-kernel::defstruct-description-p info)
(dolist (dd-slot (dd-slots info) (nreverse parts-list))
- (inspected-structure-elements object)))
+ (inspected-standard-object-elements object)))
+
+(defmethod inspected-parts ((object condition))
+ (values (format nil "The object is a CONDITION of type ~S.~%"
+ (type-of object))
+ t
+ (inspected-standard-object-elements object)))
- (let* ((type (sb-kernel:get-type object))
- (object (if (= type sb-vm:closure-header-type)
- (sb-kernel:%closure-function object)
+ (let* ((type (sb-kernel:widetag-of object))
+ (object (if (= type sb-vm:closure-header-widetag)
+ (sb-kernel:%closure-fun object)
;; Defined-from stuff used to be here. Someone took
;; it out. FIXME: We should make it easy to get
;; to DESCRIBE from the inspector.
;; Defined-from stuff used to be here. Someone took
;; it out. FIXME: We should make it easy to get
;; to DESCRIBE from the inspector.
(defmethod inspected-parts ((object array))
(let* ((length (min (array-total-size object) *inspect-length*))
(defmethod inspected-parts ((object array))
(let* ((length (min (array-total-size object) *inspect-length*))