From fadd1d97142c041d3ea44e32f97755e5a25043ba 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 --- 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 41e97e6728..f75c0d4af9 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