X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdebug.lisp;h=9852810e3bbf85b38c300fdba69b0426ad710e90;hb=f7faed97898dd0e94a18b0d1fca03aaa0fe24ab0;hp=014103c51b622d7664018a449905d23b1275ce2e;hpb=76a4d3c300f4fbf5f3fa770b0c5fddf377cf7748;p=sbcl.git diff --git a/src/code/debug.lisp b/src/code/debug.lisp index 014103c..9852810 100644 --- a/src/code/debug.lisp +++ b/src/code/debug.lisp @@ -191,9 +191,14 @@ Other commands: In the debugger, the current frame is indicated by the prompt. COUNT is how many frames to show." (fresh-line stream) - (map-backtrace (lambda (frame) - (print-frame-call frame stream :number t)) - :count count) + (let ((*suppress-print-errors* (if (subtypep 'serious-condition *suppress-print-errors*) + *suppress-print-errors* + 'serious-condition)) + (*print-circle* t)) + (handler-bind ((print-not-readable #'print-unreadably)) + (map-backtrace (lambda (frame) + (print-frame-call frame stream :number t)) + :count count))) (fresh-line stream) (values)) @@ -413,21 +418,20 @@ thread, NIL otherwise." ;; For the function arguments, we can just print normally. (let ((*print-length* nil) (*print-level* nil)) - (prin1 (ensure-printable-object name) stream)) - ;; If we hit a &REST arg, then print as many of the values as - ;; possible, punting the loop over lambda-list variables since any - ;; other arguments will be in the &REST arg's list of values. - (let ((print-args (ensure-printable-object args)) - ;; Special case *PRINT-PRETTY* for eval frames: if - ;; *PRINT-LINES* is 1, turn off pretty-printing. - (*print-pretty* - (if (and (eql 1 *print-lines*) - (member name '(eval simple-eval-in-lexenv))) - nil - *print-pretty*))) - (if (listp print-args) - (format stream "~{ ~_~S~}" print-args) - (format stream " ~S" print-args)))) + (prin1 name stream)) + ;; If we hit a &REST arg, then print as many of the values + ;; as possible, punting the loop over lambda-list variables + ;; since any other arguments will be in the &REST arg's list + ;; of values. Special case *PRINT-PRETTY* for eval frames: + ;; if *PRINT-LINES* is 1, turn off pretty-printing. + (let ((*print-pretty* + (if (and (eql 1 *print-lines*) + (member name '(eval simple-eval-in-lexenv))) + nil + *print-pretty*)))) + (if (listp args) + (format stream "~{ ~_~S~}" args) + (format stream " ~S" args))) (when kind (format stream "[~S]" kind)))) (when (>= verbosity 2) @@ -583,7 +587,7 @@ reset to ~S." ;; definitely preferred, because the FORMAT alternative was acting odd. (pprint-logical-block (stream nil) (format stream - "debugger invoked on a ~S~@[ in thread ~A~]: ~2I~_~A" + "debugger invoked on a ~S~@[ in thread ~_~A~]: ~2I~_~A" (type-of condition) #!+sb-thread sb!thread:*current-thread* #!-sb-thread nil