make sure bindings in annotations come from scheme/base
remove tip from docs about needing to save files before debugging svn: r8872
This commit is contained in:
parent
f2f2322140
commit
f721101444
|
@ -1,7 +1,6 @@
|
||||||
(module annotator scheme/base
|
(module annotator scheme/base
|
||||||
|
|
||||||
(require (prefix-in kernel: syntax/kerncase)
|
(require (prefix-in kernel: syntax/kerncase)
|
||||||
mzlib/list
|
|
||||||
(lib "marks.ss" "gui-debugger")
|
(lib "marks.ss" "gui-debugger")
|
||||||
mzlib/etc
|
mzlib/etc
|
||||||
(prefix-in srfi: srfi/1/search)
|
(prefix-in srfi: srfi/1/search)
|
||||||
|
@ -180,7 +179,7 @@
|
||||||
(for-each (lambda (v) (record-bound-id 'bind v v))
|
(for-each (lambda (v) (record-bound-id 'bind v v))
|
||||||
(syntax->list #'(var ...)))
|
(syntax->list #'(var ...)))
|
||||||
(quasisyntax/loc stx
|
(quasisyntax/loc stx
|
||||||
(begin (define-values (var ...) #,(annotate #`expr empty #t module-name))
|
(begin (define-values (var ...) #,(annotate #`expr '() #t module-name))
|
||||||
#,(if (syntax-source stx)
|
#,(if (syntax-source stx)
|
||||||
#`(begin (#,record-top-level-id '#,module-name #'var (case-lambda
|
#`(begin (#,record-top-level-id '#,module-name #'var (case-lambda
|
||||||
[() var]
|
[() var]
|
||||||
|
@ -301,8 +300,7 @@
|
||||||
(let ([binder (and (syntax-original? expr)
|
(let ([binder (and (syntax-original? expr)
|
||||||
(srfi:member expr bound-vars free-identifier=?))])
|
(srfi:member expr bound-vars free-identifier=?))])
|
||||||
(if binder
|
(if binder
|
||||||
(let ([f (first binder)])
|
(record-bound-id 'ref expr (car binder))
|
||||||
(record-bound-id 'ref expr f))
|
|
||||||
(record-bound-id 'top-level expr expr))
|
(record-bound-id 'top-level expr expr))
|
||||||
expr)]
|
expr)]
|
||||||
|
|
||||||
|
@ -343,8 +341,7 @@
|
||||||
(let ([binder (and (syntax-original? #'var)
|
(let ([binder (and (syntax-original? #'var)
|
||||||
(srfi:member #'var bound-vars free-identifier=?))])
|
(srfi:member #'var bound-vars free-identifier=?))])
|
||||||
(when binder
|
(when binder
|
||||||
(let ([f (first binder)])
|
(record-bound-id 'set expr (car binder)))
|
||||||
(record-bound-id 'set expr f)))
|
|
||||||
(quasisyntax/loc expr (set! var #,(annotate #`val bound-vars #f module-name ))))]
|
(quasisyntax/loc expr (set! var #,(annotate #`val bound-vars #f module-name ))))]
|
||||||
|
|
||||||
[(quote _) expr]
|
[(quote _) expr]
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
(module marks mzscheme
|
(module marks scheme/base
|
||||||
|
|
||||||
(require mzlib/list
|
(require mzlib/list
|
||||||
mzlib/contract
|
mzlib/contract
|
||||||
|
(prefix-in mz: mzscheme)
|
||||||
(lib "my-macros.ss" "stepper" "private")
|
(lib "my-macros.ss" "stepper" "private")
|
||||||
(lib "shared.ss" "stepper" "private"))
|
(lib "shared.ss" "stepper" "private"))
|
||||||
|
|
||||||
|
@ -20,7 +21,7 @@
|
||||||
[lookup-first-binding ((identifier? . -> . boolean?) mark-list? ( -> any) . -> . any)]
|
[lookup-first-binding ((identifier? . -> . boolean?) mark-list? ( -> any) . -> . any)]
|
||||||
[lookup-binding (mark-list? identifier? . -> . any)])
|
[lookup-binding (mark-list? identifier? . -> . any)])
|
||||||
|
|
||||||
(provide
|
(mz:provide
|
||||||
make-debug-info
|
make-debug-info
|
||||||
assemble-debug-info
|
assemble-debug-info
|
||||||
wcm-wrap
|
wcm-wrap
|
||||||
|
@ -40,10 +41,10 @@
|
||||||
#;lookup-binding-list
|
#;lookup-binding-list
|
||||||
debug-key
|
debug-key
|
||||||
extract-mark-list
|
extract-mark-list
|
||||||
(struct normal-breakpoint-info (mark-list kind))
|
make-normal-breakpoint-info normal-breakpoint-info-mark-list normal-breakpoint-info-kind
|
||||||
(struct error-breakpoint-info (message))
|
make-error-breakpoint-info error-breakpoint-info-message
|
||||||
(struct breakpoint-halt ())
|
(struct breakpoint-halt ())
|
||||||
(struct expression-finished (returned-value-list)))
|
make-expression-finished expression-finished-returned-value-list)
|
||||||
|
|
||||||
; BREAKPOINT STRUCTURES
|
; BREAKPOINT STRUCTURES
|
||||||
|
|
||||||
|
@ -74,7 +75,7 @@
|
||||||
|
|
||||||
; see module top for type
|
; see module top for type
|
||||||
(define (make-full-mark module-name source label bindings assembled-info-stx)
|
(define (make-full-mark module-name source label bindings assembled-info-stx)
|
||||||
(datum->syntax-object #'here `(lambda () (,(make-make-full-mark-varargs module-name source label bindings)
|
(mz:datum->syntax-object #'here `(lambda () (,(make-make-full-mark-varargs module-name source label bindings)
|
||||||
,assembled-info-stx))))
|
,assembled-info-stx))))
|
||||||
|
|
||||||
(define (mark-module-name mark)
|
(define (mark-module-name mark)
|
||||||
|
@ -120,7 +121,7 @@
|
||||||
(define (display-mark mark)
|
(define (display-mark mark)
|
||||||
(apply
|
(apply
|
||||||
string-append
|
string-append
|
||||||
(format "source: ~a~n" (syntax-object->datum (mark-source mark)))
|
(format "source: ~a~n" (mz:syntax-object->datum (mark-source mark)))
|
||||||
(format "label: ~a~n" (mark-label mark))
|
(format "label: ~a~n" (mark-label mark))
|
||||||
(format "bindings:~n")
|
(format "bindings:~n")
|
||||||
(map (lambda (binding)
|
(map (lambda (binding)
|
||||||
|
@ -146,11 +147,11 @@
|
||||||
|
|
||||||
(define (lookup-binding mark-list id)
|
(define (lookup-binding mark-list id)
|
||||||
(mark-binding-value
|
(mark-binding-value
|
||||||
(lookup-first-binding (lambda (id2) (module-identifier=? id id2))
|
(lookup-first-binding (lambda (id2) (mz:module-identifier=? id id2))
|
||||||
mark-list
|
mark-list
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(error 'lookup-binding "variable not found in environment: ~a~n" (if (syntax? id)
|
(error 'lookup-binding "variable not found in environment: ~a~n" (if (syntax? id)
|
||||||
(syntax-object->datum id)
|
(mz:syntax-object->datum id)
|
||||||
id))))))
|
id))))))
|
||||||
|
|
||||||
(define (all-bindings mark)
|
(define (all-bindings mark)
|
||||||
|
|
|
@ -515,11 +515,8 @@ a Scheme splice box.
|
||||||
|
|
||||||
@section[#:tag "debugger"]{Graphical Debugging Interface}
|
@section[#:tag "debugger"]{Graphical Debugging Interface}
|
||||||
|
|
||||||
@bold{Tip:} The debugger will not work properly on @onscreen{Untitled}
|
@bold{Tip:} Changing the name of a file in the middle of a debugging
|
||||||
windows or tabs. To debug a new program, make sure it has been saved
|
session will prevent the debugger from working properly on that file.
|
||||||
to the file system. Also, changing the name of a file in the middle
|
|
||||||
of a debugging session will prevent the debugger from working properly
|
|
||||||
on that file.
|
|
||||||
|
|
||||||
Like the @onscreen{Run} button, the @as-index{@onscreen{Debug} button}
|
Like the @onscreen{Run} button, the @as-index{@onscreen{Debug} button}
|
||||||
runs the program in the definitions window. However, instead of
|
runs the program in the definitions window. However, instead of
|
||||||
|
|
Loading…
Reference in New Issue
Block a user