From 07dd4500f57d131580a4e5f2efe1157b64f10761 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 24 Jul 2012 04:03:49 -0500 Subject: [PATCH] fix debugger for the case when it decides not to annotate a file related to PR 12937 This doesn't seem to fix the PR since the debugger is currently ignoring the TR programs (not annotating them) but at least it does not crash now Please merge to 5.3 (cherry picked from commit fadd1d97142c041d3ea44e32f97755e5a25043ba) --- collects/gui-debugger/debug-tool.rkt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/collects/gui-debugger/debug-tool.rkt b/collects/gui-debugger/debug-tool.rkt index 1a034af1b4..c70714085d 100644 --- a/collects/gui-debugger/debug-tool.rkt +++ b/collects/gui-debugger/debug-tool.rkt @@ -634,9 +634,12 @@ (let ([src (syntax-source orig-exp)]) (and (path? src) src)))) - (when (or (eq? (filename->defs fn) (send (get-tab) get-defs)) - (annotate-this-module? fn)) - (parameterize ([current-eval oe]) + (cond + [(or (eq? (filename->defs (and (syntax? orig-exp) + (syntax-source orig-exp))) + (send (get-tab) get-defs)) + (annotate-this-module? fn)) + (parameterize ([current-eval oe]) (eval/annotations top-e ; annotate-module? @@ -688,7 +691,8 @@ (hash-set! breakpoints posn (hash-ref breakpoints posn (lambda () #f)))) - annotated))))]))) + annotated)))] + [else (oe top-e)])]))) (define/private (annotate-this-module? fn) (cond