From: Nikodemus Siivola Date: Sun, 19 Sep 2010 19:09:21 +0000 (+0000) Subject: 1.0.42.42: hack around *AUTO-EVAL-IN-FRAME* issues X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=809babfb68a91aa47a7f011972d39915a77a9895;p=sbcl.git 1.0.42.42: hack around *AUTO-EVAL-IN-FRAME* issues When frame doesn't have sufficient debug information and *AUTO-EVAL-IN-FRAME* is true -- the default -- the debugger REPL becomes useless in the frame. Oops. So, in those cases punt to regular EVAL instead -- which is the right thing most of the time. To avoid confusion by DWIM, tell the user when punting to global context. --- diff --git a/NEWS b/NEWS index 9e8ef2a..6f6d53e 100644 --- a/NEWS +++ b/NEWS @@ -46,9 +46,10 @@ changes relative to sbcl-1.0.42 * bug fix: spurious ignore warnings even given (DECLARE IGNORE) in methods when parameter bindings mutated. (reported by Faré Rideau; lp #611361) * bug fix: workaround for compiler hang in ORDER-UVL-SETS (lp#308914) + * bug fix: evaluation in debugger REPL works using the global context when + in frames that do not have sufficient debug information. changes in sbcl-1.0.42 relative to sbcl-1.0.41 - * build changes ** Cross-compilation host is now specified to make.sh using command-line argument --xc-host= instead of a positional diff --git a/src/code/debug.lisp b/src/code/debug.lisp index 05cef22..c89794b 100644 --- a/src/code/debug.lisp +++ b/src/code/debug.lisp @@ -820,9 +820,14 @@ and LDB (the low-level debugger). See also ENABLE-DEBUGGER." forms that explicitly control this kind of evaluation.") (defun debug-eval (expr) - (if (and (fboundp 'compile) *auto-eval-in-frame*) - (sb!di:eval-in-frame *current-frame* expr) - (eval expr))) + (cond ((not (and (fboundp 'compile) *auto-eval-in-frame*)) + (eval expr)) + ((frame-has-debug-vars-p *current-frame*) + (sb!di:eval-in-frame *current-frame* expr)) + (t + (format *debug-io* "; No debug variables for current frame: ~ + using EVAL instead of EVAL-IN-FRAME.~%") + (eval expr)))) (defun debug-eval-print (expr) (/noshow "entering DEBUG-EVAL-PRINT" expr) @@ -1549,6 +1554,11 @@ and LDB (the low-level debugger). See also ENABLE-DEBUGGER." #!-unwind-to-frame-and-call-vop (find 'sb!c:debug-catch-tag (sb!di::frame-catches frame) :key #'car)) +(defun frame-has-debug-vars-p (frame) + (sb!di:debug-var-info-available + (sb!di:code-location-debug-fun + (sb!di:frame-code-location frame)))) + ;; Hack: ensure that *U-T-F-F* has a tls index. #!+unwind-to-frame-and-call-vop (let ((sb!vm::*unwind-to-frame-function* (lambda ())))) diff --git a/version.lisp-expr b/version.lisp-expr index a35679e..d2e8801 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.42.41" +"1.0.42.42"