From cfd81b9892e86bc51004a005bb6eab882800596e Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Mon, 15 Apr 2024 05:08:17 +0300 Subject: [PATCH] Don't show "gf-dispatch" in backtraces. --- src/code/debug.lisp | 2 ++ tests/backtrace.impure.lisp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/code/debug.lisp b/src/code/debug.lisp index c1df1dbee..c26567dd3 100644 --- a/src/code/debug.lisp +++ b/src/code/debug.lisp @@ -661,6 +661,8 @@ information." (defun clean-frame-call (frame argument-limit name method-frame-style info) (let ((args (frame-args-as-list frame argument-limit))) + (when (typep name '(cons (eql sb-pcl::gf-dispatch))) + (setf name (cadr name))) (cond ((typep name '(cons (eql sb-pcl::fast-method))) (clean-fast-method name args method-frame-style info)) ((memq :external info) diff --git a/tests/backtrace.impure.lisp b/tests/backtrace.impure.lisp index ae07d2699..264b1f4c9 100644 --- a/tests/backtrace.impure.lisp +++ b/tests/backtrace.impure.lisp @@ -550,7 +550,7 @@ (gf-dispatch-test/gf 1 1) ;; Wrong argument count (assert-backtrace (lambda () (gf-dispatch-test/f 42)) - '(((sb-pcl::gf-dispatch gf-dispatch-test/gf) 42)))) + '((gf-dispatch-test/gf 42)))) (defgeneric gf-default-only-test/gf (x y) (:method (x y) (+ x y))) -- 2.11.4.GIT