summaryrefslogtreecommitdiff
path: root/module/system/repl/command.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-11-07 18:00:40 +0100
committerAndy Wingo <wingo@pobox.com>2013-11-07 18:00:40 +0100
commite15aa022847507c3eeb84c180d20a4209ece1cb6 (patch)
tree9612fffd37c5e623f8b6206c31e8da090c4bc407 /module/system/repl/command.scm
parent0128bb9c38b28e74675e72539a162b5cf9848845 (diff)
downloadguile-e15aa022847507c3eeb84c180d20a4209ece1cb6.tar.gz
Program sources are always pre-retire now
* module/system/repl/debug.scm (<debug>): Remove for-trap?. Backtraces with RTL will always happen pre-retire on the top frame, source info is pre-retire, and continuations will always have a source-marked receive or receive-values or whatever with the right source marking, so we can remove this complication. (print-frame): Use frame-source. (print-frames): Remove for-trap? kw. * module/system/repl/command.scm (define-stack-command, backtrace) (up, down, frame): Remove for-trap? introduced local, and its uses. (repl-pop-continuation-resumer): Adapt to make-debug change. * module/system/repl/error-handling.scm (call-with-error-handling): Adapt to make-debug change. * module/system/vm/frame.scm (frame-next-source): Remove. RTL sources are pre-retire. * module/system/vm/trap-state.scm (add-ephemeral-stepping-trap!): Adapt to use frame-source. Still some work to do here.
Diffstat (limited to 'module/system/repl/command.scm')
-rw-r--r--module/system/repl/command.scm26
1 files changed, 9 insertions, 17 deletions
diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm
index ca080d279..1e6aaff3d 100644
--- a/module/system/repl/command.scm
+++ b/module/system/repl/command.scm
@@ -569,8 +569,6 @@ Trace execution."
(identifier-syntax (debug-frames debug)))
(#,(datum->syntax #'repl 'message)
(identifier-syntax (debug-error-message debug)))
- (#,(datum->syntax #'repl 'for-trap?)
- (identifier-syntax (debug-for-trap? debug)))
(#,(datum->syntax #'repl 'index)
(identifier-syntax
(id (debug-index debug))
@@ -592,8 +590,7 @@ If COUNT is negative, the last COUNT frames will be shown."
(print-frames frames
#:count count
#:width width
- #:full? full?
- #:for-trap? for-trap?))
+ #:full? full?))
(define-stack-command (up repl #:optional (count 1))
"up [COUNT]
@@ -610,12 +607,10 @@ An argument says how many frames up to go."
(format #t "Already at outermost frame.\n"))
(else
(set! index (1- (vector-length frames)))
- (print-frame cur #:index index
- #:next-source? (and (zero? index) for-trap?)))))
+ (print-frame cur #:index index))))
(else
(set! index (+ count index))
- (print-frame cur #:index index
- #:next-source? (and (zero? index) for-trap?)))))
+ (print-frame cur #:index index))))
(define-stack-command (down repl #:optional (count 1))
"down [COUNT]
@@ -632,11 +627,10 @@ An argument says how many frames down to go."
(format #t "Already at innermost frame.\n"))
(else
(set! index 0)
- (print-frame cur #:index index #:next-source? for-trap?))))
+ (print-frame cur #:index index))))
(else
(set! index (- index count))
- (print-frame cur #:index index
- #:next-source? (and (zero? index) for-trap?)))))
+ (print-frame cur #:index index))))
(define-stack-command (frame repl #:optional idx)
"frame [IDX]
@@ -651,12 +645,10 @@ With an argument, select a frame by index, then show it."
(format #t "Invalid argument to `frame': expected a non-negative integer for IDX.~%"))
((< idx (vector-length frames))
(set! index idx)
- (print-frame cur #:index index
- #:next-source? (and (zero? index) for-trap?)))
+ (print-frame cur #:index index))
(else
(format #t "No such frame.~%"))))
- (else (print-frame cur #:index index
- #:next-source? (and (zero? index) for-trap?)))))
+ (else (print-frame cur #:index index))))
(define-stack-command (procedure repl)
"procedure
@@ -722,7 +714,7 @@ Note that the given source location must be inside a procedure."
(format #t "Return values:~%")
(for-each (lambda (x) (repl-print repl x)) values)))
((module-ref (resolve-interface '(system repl repl)) 'start-repl)
- #:debug (make-debug stack 0 msg #t))))))
+ #:debug (make-debug stack 0 msg))))))
(define-stack-command (finish repl)
"finish
@@ -746,7 +738,7 @@ Resume execution, breaking when the current frame finishes."
(k (frame->stack-vector frame)))))))
(format #t "~a~%" msg)
((module-ref (resolve-interface '(system repl repl)) 'start-repl)
- #:debug (make-debug stack 0 msg #t)))))
+ #:debug (make-debug stack 0 msg)))))
(define-stack-command (step repl)
"step