From 513af2184c971e8d6b874e880b02e31909e9e2d2 Mon Sep 17 00:00:00 2001 From: "Tobias C. Rittweiler" Date: Thu, 10 Dec 2009 23:32:18 +0000 Subject: [PATCH] 1.0.33.7: Indicate *DEBUGGER-HOOK* / SB-EXT:*INVOKE-DEBUGGER-HOOK* in backtrace. --- src/code/debug.lisp | 20 ++++++++++++-------- version.lisp-expr | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/code/debug.lisp b/src/code/debug.lisp index 165a874..16607b5 100644 --- a/src/code/debug.lisp +++ b/src/code/debug.lisp @@ -482,20 +482,24 @@ is how many frames to show." (nreverse (mapcar #'cdr *debug-print-variable-alist*)) (apply fun rest))))))) +;;; This function is not inlined so it shows up in the backtrace; that +;;; can be rather handy when one has to debug the interplay between +;;; *INVOKE-DEBUGGER-HOOK* and *DEBUGGER-HOOK*. +(declaim (notinline run-hook)) +(defun run-hook (variable condition) + (let ((old-hook (symbol-value variable))) + (when old-hook + (progv (list variable) (list nil) + (funcall old-hook condition old-hook))))) + (defun invoke-debugger (condition) #!+sb-doc "Enter the debugger." ;; call *INVOKE-DEBUGGER-HOOK* first, so that *DEBUGGER-HOOK* is not ;; called when the debugger is disabled - (let ((old-hook *invoke-debugger-hook*)) - (when old-hook - (let ((*invoke-debugger-hook* nil)) - (funcall old-hook condition old-hook)))) - (let ((old-hook *debugger-hook*)) - (when old-hook - (let ((*debugger-hook* nil)) - (funcall old-hook condition old-hook)))) + (run-hook '*invoke-debugger-hook* condition) + (run-hook '*debugger-hook* condition) ;; We definitely want *PACKAGE* to be of valid type. ;; diff --git a/version.lisp-expr b/version.lisp-expr index 436b013..06e1478 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.33.6" +"1.0.33.7" -- 1.7.10.4