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

* boot-9.scm (backtrace): Removed. (A C version now exists in

backtrace.c.)
This commit is contained in:
Mikael Djurfeldt 1997-02-10 01:05:50 +00:00
parent 5aab5d961c
commit d590bbf6d8
2 changed files with 22 additions and 16 deletions

View file

@ -1,3 +1,8 @@
Mon Feb 10 03:01:48 1997 Mikael Djurfeldt <mdj@kenneth>
* boot-9.scm (backtrace): Removed. (A C version now exists in
backtrace.c.)
Fri Jan 24 06:05:36 1997 Gary Houston <ghouston@actrix.gen.nz> Fri Jan 24 06:05:36 1997 Gary Houston <ghouston@actrix.gen.nz>
* boot-9.scm (read-line!, read-delimited!, read-delimited, * boot-9.scm (read-line!, read-delimited!, read-delimited,

View file

@ -2191,7 +2191,7 @@
(and next (loop next)))) (and next (loop next))))
(loop (lambda () #t))) (loop (lambda () #t)))
(define the-last-stack #f) ;;(define the-last-stack #f) Defined by scm_init_backtrace ()
(define stack-saved? #f) (define stack-saved? #f)
(define (save-stack . narrowing) (define (save-stack . narrowing)
@ -2240,22 +2240,23 @@
(define (quit . args) (define (quit . args)
(apply throw 'quit args)) (apply throw 'quit args))
(define has-shown-backtrace-hint? #f) ;;(define has-shown-backtrace-hint? #f) Defined by scm_init_backtrace ()
(define (backtrace) ;; Replaced by C code:
(if the-last-stack ;;(define (backtrace)
(begin ;; (if the-last-stack
(newline) ;; (begin
(display-backtrace the-last-stack (current-output-port)) ;; (newline)
(newline) ;; (display-backtrace the-last-stack (current-output-port))
(if (and (not has-shown-backtrace-hint?) ;; (newline)
(not (memq 'backtrace (debug-options-interface)))) ;; (if (and (not has-shown-backtrace-hint?)
(begin ;; (not (memq 'backtrace (debug-options-interface))))
(display ;; (begin
"Type \"(debug-enable 'backtrace)\" if you would like a backtrace ;; (display
automatically if an error occurs in the future.\n") ;;"Type \"(debug-enable 'backtrace)\" if you would like a backtrace
(set! has-shown-backtrace-hint? #t)))) ;;automatically if an error occurs in the future.\n")
(display "No backtrace available.\n"))) ;; (set! has-shown-backtrace-hint? #t))))
;; (display "No backtrace available.\n")))
(define (error-catching-repl r e p) (define (error-catching-repl r e p)
(error-catching-loop (lambda () (p (e (r)))))) (error-catching-loop (lambda () (p (e (r))))))