1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-05 17:20:18 +02:00

* debugger/commands.scm (assert-continuable, continue, finish,

trace-finish, step, next): 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.
This commit is contained in:
Neil Jerram 2005-07-09 14:53:50 +00:00
parent 8fecbb1900
commit 9f4f17587d
12 changed files with 21 additions and 76 deletions

View file

@ -1,3 +1,22 @@
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> 2005-06-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
* boot-9.scm (set-module-eval-closure!): remove * boot-9.scm (set-module-eval-closure!): remove

View file

@ -21,7 +21,6 @@
#:use-module (ice-9 debugger state) #:use-module (ice-9 debugger state)
#:use-module (ice-9 debugger utils) #:use-module (ice-9 debugger utils)
#:use-module (ice-9 format) #:use-module (ice-9 format)
#:use-module (emacs gds-client)
#:export (debug-stack #:export (debug-stack
debug debug
debug-last-error debug-last-error
@ -121,9 +120,7 @@ Indicates that the debugger should display an introductory message.
(display "There is 1 frame on the stack.\n\n") (display "There is 1 frame on the stack.\n\n")
(format #t "There are ~A frames on the stack.\n\n" ssize)))) (format #t "There are ~A frames on the stack.\n\n" ssize))))
(write-state-short state) (write-state-short state)
(if (gds-connected?) (debugger-command-loop state))))))))
(gds-command-loop state)
(debugger-command-loop state)))))))))
(define (debug) (define (debug)
"Invoke the Guile debugger to explore the context of the last error." "Invoke the Guile debugger to explore the context of the last error."

View file

@ -540,14 +540,3 @@
(define-command-alias "where" "backtrace") (define-command-alias "where" "backtrace")
(define-command-alias "p" "evaluate") (define-command-alias "p" "evaluate")
(define-command-alias '("info" "stack") "backtrace") (define-command-alias '("info" "stack") "backtrace")
(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)

View file

@ -19,9 +19,7 @@
(define-module (ice-9 debugger commands) (define-module (ice-9 debugger commands)
#:use-module (ice-9 debug) #:use-module (ice-9 debug)
#:use-module (ice-9 debugger) #:use-module (ice-9 debugger)
#:use-module (ice-9 debugger behaviour)
#:use-module (ice-9 debugger state) #:use-module (ice-9 debugger state)
#:use-module (ice-9 debugger trap-hooks)
#:use-module (ice-9 debugger utils) #:use-module (ice-9 debugger utils)
#:export (backtrace #:export (backtrace
evaluate evaluate
@ -30,13 +28,7 @@
position position
up up
down down
frame frame))
continue
finish
trace-finish
next
step
debug-trap-hooks))
(define (backtrace state n-frames) (define (backtrace state n-frames)
"Print backtrace of all stack frames, or innermost COUNT frames. "Print backtrace of all stack frames, or innermost COUNT frames.
@ -151,56 +143,4 @@ An argument specifies the frame to select; it must be a stack-frame number."
(if n (set-stack-index! state (frame-number->index n (state-stack state)))) (if n (set-stack-index! state (frame-number->index n (state-stack state))))
(write-state-short 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. ;;; (ice-9 debugger commands) ends here.