diff options
author | Andy Wingo <wingo@pobox.com> | 2013-11-07 18:00:40 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-11-07 18:00:40 +0100 |
commit | e15aa022847507c3eeb84c180d20a4209ece1cb6 (patch) | |
tree | 9612fffd37c5e623f8b6206c31e8da090c4bc407 /module/system/repl/debug.scm | |
parent | 0128bb9c38b28e74675e72539a162b5cf9848845 (diff) | |
download | guile-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/debug.scm')
-rw-r--r-- | module/system/repl/debug.scm | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/module/system/repl/debug.scm b/module/system/repl/debug.scm index cf408063e..0b4a90485 100644 --- a/module/system/repl/debug.scm +++ b/module/system/repl/debug.scm @@ -1,6 +1,6 @@ ;;; Guile VM debugging facilities -;;; Copyright (C) 2001, 2009, 2010, 2011 Free Software Foundation, Inc. +;;; Copyright (C) 2001, 2009, 2010, 2011, 2013 Free Software Foundation, Inc. ;;; ;;; This library is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU Lesser General Public @@ -31,7 +31,7 @@ #:use-module (system vm program) #:export (<debug> make-debug debug? - debug-frames debug-index debug-error-message debug-for-trap? + debug-frames debug-index debug-error-message terminal-width print-registers print-locals print-frame print-frames frame->module stack->vector narrow-stack->vector @@ -55,7 +55,7 @@ ;;; accessors, and provides some helper functions. ;;; -(define-record <debug> frames index error-message for-trap?) +(define-record <debug> frames index error-message) @@ -125,7 +125,7 @@ (if source (or (source:file source) "current input") "unknown file")) - (let* ((source ((if next-source? frame-next-source frame-source) frame)) + (let* ((source (frame-source frame)) (file (source:pretty-file source)) (line (and=> source source:line-for-user)) (col (and=> source source:column))) @@ -141,7 +141,7 @@ (define* (print-frames frames #:optional (port (current-output-port)) #:key (width (terminal-width)) (full? #f) - (forward? #f) count for-trap?) + (forward? #f) count) (let* ((len (vector-length frames)) (lower-idx (if (or (not count) (positive? count)) 0 @@ -155,12 +155,9 @@ (if (<= lower-idx i upper-idx) (let* ((frame (vector-ref frames i))) (print-frame frame port #:index i #:width width #:full? full? - #:last-source last-source - #:next-source? (and (zero? i) for-trap?)) + #:last-source last-source) (lp (+ i inc) - (if (and (zero? i) for-trap?) - (frame-next-source frame) - (frame-source frame)))))))) + (frame-source frame))))))) ;; Ideally here we would have something much more syntactic, in that a set! to a ;; local var that is not settable would raise an error, and export etc forms |