/[guile]/guile/guile-core/ice-9/debugger.scm
ViewVC logotype

Diff of /guile/guile-core/ice-9/debugger.scm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by mvo, Sat Apr 5 19:04:27 2003 UTC revision 1.16 by ossau, Thu Sep 25 20:29:24 2003 UTC
# Line 19  Line 19 
19  (define-module (ice-9 debugger)  (define-module (ice-9 debugger)
20    #:use-module (ice-9 debugger command-loop)    #:use-module (ice-9 debugger command-loop)
21    #:use-module (ice-9 debugger state)    #:use-module (ice-9 debugger state)
22      #:use-module (ice-9 debugger ui-client)
23    #:use-module (ice-9 debugger utils)    #:use-module (ice-9 debugger utils)
24    #:use-module (ice-9 format)    #:use-module (ice-9 format)
25    #:export (debug-stack    #:export (debug-stack
# Line 27  Line 28 
28              debugger-error              debugger-error
29              debugger-quit              debugger-quit
30              debugger-input-port              debugger-input-port
31              debugger-output-port)              debugger-output-port
32                debug-on-error)
33    #:no-backtrace)    #:no-backtrace)
34    
35  ;;; The old (ice-9 debugger) has been factored into its constituent  ;;; The old (ice-9 debugger) has been factored into its constituent
# Line 119  Indicates that the debugger should displ Line 121  Indicates that the debugger should displ
121                          (display "There is 1 frame on the stack.\n\n")                          (display "There is 1 frame on the stack.\n\n")
122                          (format #t "There are ~A frames on the stack.\n\n" ssize))))                          (format #t "There are ~A frames on the stack.\n\n" ssize))))
123                (write-state-short state)                (write-state-short state)
124                (debugger-command-loop state))))))))                (if (ui-connected?)
125                      (ui-command-loop state)
126                      (debugger-command-loop state)))))))))
127    
128  (define (debug)  (define (debug)
129    "Invoke the Guile debugger to explore the context of the last error."    "Invoke the Guile debugger to explore the context of the last error."
# Line 152  Indicates that the debugger should displ Line 156  Indicates that the debugger should displ
156       (lambda () output-port)       (lambda () output-port)
157       (lambda (port) (set! output-port port)))))       (lambda (port) (set! output-port port)))))
158    
159    ;;; {Debug on Error}
160    
161    (define default-default-lazy-handler default-lazy-handler)
162    
163    (define (debug-on-error syms)
164      "Enable or disable debug on error."
165      (set! default-lazy-handler
166            (if syms
167                (lambda (key . args)
168                  (or (memq key syms)
169                      (debug-stack (make-stack #t lazy-handler-dispatch)
170                                   #:with-introduction
171                                   #:continuable))
172                  (apply default-default-lazy-handler key args))
173                default-default-lazy-handler)))
174    
175  ;;; (ice-9 debugger) ends here.  ;;; (ice-9 debugger) ends here.

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26