+2005-07-09 Neil Jerram <neil@ossau.uklinux.net>
+
+ Changes to remove breakpoint support from CVS, as I am now
+ developing this function outside Guile core.
+
+ * debugger/commands.scm (assert-continuable, continue, finish,
+ trace-finish, step, next): Removed.
+
+ * debugger/breakpoints/*: Removed.
+
+ * debugger/breakpoints.scm: Removed.
+
+ * debugger/command-loop.scm: Remove command definitions for
+ continue, finish, trace-finish, step and next.
+
+ * debugger/behaviour.scm: Removed.
+
+ * debugger.scm (debug-stack): Remove GDS related code.
+
2005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
* boot-9.scm (set-module-eval-closure!): remove
#:use-module (ice-9 debugger state)
#:use-module (ice-9 debugger utils)
#:use-module (ice-9 format)
- #:use-module (emacs gds-client)
#:export (debug-stack
debug
debug-last-error
(display "There is 1 frame on the stack.\n\n")
(format #t "There are ~A frames on the stack.\n\n" ssize))))
(write-state-short state)
- (if (gds-connected?)
- (gds-command-loop state)
- (debugger-command-loop state)))))))))
+ (debugger-command-loop state))))))))
(define (debug)
"Invoke the Guile debugger to explore the context of the last error."
(define-command-alias "where" "backtrace")
(define-command-alias "p" "evaluate")
(define-command-alias '("info" "stack") "backtrace")
-\f
-
-(define-command "continue" '() debugger:continue)
-
-(define-command "finish" '() debugger:finish)
-
-(define-command "trace-finish" '() debugger:trace-finish)
-
-(define-command "step" '('optional exact-integer) debugger:step)
-
-(define-command "next" '('optional exact-integer) debugger:next)
(define-module (ice-9 debugger commands)
#:use-module (ice-9 debug)
#:use-module (ice-9 debugger)
- #:use-module (ice-9 debugger behaviour)
#:use-module (ice-9 debugger state)
- #:use-module (ice-9 debugger trap-hooks)
#:use-module (ice-9 debugger utils)
#:export (backtrace
evaluate
position
up
down
- frame
- continue
- finish
- trace-finish
- next
- step
- debug-trap-hooks))
+ frame))
(define (backtrace state n-frames)
"Print backtrace of all stack frames, or innermost COUNT frames.
(if n (set-stack-index! state (frame-number->index n (state-stack state))))
(write-state-short state))
-(define (debug-trap-hooks state)
- (debug-hook-membership)
- state)
-
-;;;; Additional commands that make sense when debugging code that has
-;;;; stopped at a breakpoint.
-
-(define (assert-continuable state)
- ;; Check that debugger is in a state where `continuing' makes sense.
- ;; If not, signal an error.
- (or (memq #:continuable (state-flags state))
- (debugger-error "This debug session is not continuable.")))
-
-(define (continue state)
- "Continue program execution."
- (assert-continuable state)
- (debugger-quit))
-
-(define (finish state)
- "Continue until evaluation of the current frame is complete, and
-print the result obtained."
- (assert-continuable state)
- (with-reference-frame (stack-ref (state-stack state) (state-index state))
- (at-exit (lambda ()
- (trace-exit-value)
- (debug-here))))
- (continue state))
-
-(define (next state n)
- "Continue until entry to @var{n}th next frame in same file."
- (assert-continuable state)
- (with-reference-frame (stack-ref (state-stack state) (state-index state))
- (at-next (or n 1) debug-here))
- (continue state))
-
-(define (step state n)
- "Continue until entry to @var{n}th next frame."
- (assert-continuable state)
- (at-step (or n 1) debug-here)
- ;; An alternative behaviour that might be interesting ...
- ;; (with-reference-frame (stack-ref (state-stack state) (state-index state))
- ;; (at-exit (lambda () (at-step (or n 1) debug-here))))
- (continue state))
-
-(define (trace-finish state)
- "Trace until evaluation of the current frame is complete."
- (assert-continuable state)
- (with-reference-frame (stack-ref (state-stack state) (state-index state))
- (trace-until-exit)
- (at-exit debug-here))
- (continue state))
-
;;; (ice-9 debugger commands) ends here.