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