fix debugger to handle when syntax-position is #f

svn: r7169
This commit is contained in:
Greg Cooper 2007-08-26 03:56:22 +00:00
parent f6f6c9061b
commit 295f53b213

View File

@ -791,7 +791,9 @@
(let/ec k
(let* ([stx (mark-source frame)]
[src (syntax-source stx)]
[pos (+ (syntax-position stx) (syntax-span stx) -1)]
[pos (if (not (syntax-position stx))
(k 'invalid)
(+ (syntax-position stx) (syntax-span stx) -1))]
[defs (filename->defs src)]
[tab (if defs (send defs get-tab) (k (begin #;(printf "no defs for ~a~n" src) 'invalid)))]
[bps (send tab get-breakpoints)])
@ -802,8 +804,9 @@
(not (eq? (frame->end-breakpoint-status (first frames)) 'invalid))))
(define (can-step-out? frames status)
(or (ormap (lambda (f) (not (eq? (frame->end-breakpoint-status f) 'invalid)))
(rest frames))
(or (and (not (empty? frames))
(ormap (lambda (f) (not (eq? (frame->end-breakpoint-status f) 'invalid)))
(rest frames)))
(begin
#;(printf "cannot step out: stack is ~a~n" frames)
#f)))