X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdebug.lisp;h=5190f3f4bc33134ea6f518c17668965ee6d02f99;hb=c325337271f3d5a1a1c1b5fe2bd009d7ab31b7ac;hp=9852810e3bbf85b38c300fdba69b0426ad710e90;hpb=026aef761bfe2e191fa38be357da233aacd6119e;p=sbcl.git diff --git a/src/code/debug.lisp b/src/code/debug.lisp index 9852810..5190f3f 100644 --- a/src/code/debug.lisp +++ b/src/code/debug.lisp @@ -331,11 +331,18 @@ thread, NIL otherwise." (defun clean-xep (name args) (values (second name) (if (consp args) - (let ((count (first args)) - (real-args (rest args))) + (let* ((count (first args)) + (real-args (rest args))) (if (fixnump count) - (subseq real-args 0 - (min count (length real-args))) + ;; So, this is a cheap trick -- but makes backtraces for + ;; too-many-arguments-errors much, much easier to to + ;; understand. FIXME: For :EXTERNAL frames at least we + ;; should be able to get the actual arguments, really. + (loop repeat count + for arg = (if real-args + (pop real-args) + (make-unprintable-object "unknown")) + collect arg) real-args)) args)))