- Timestamp:
- Jun 10, 2008, 5:53:33 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/working-0711/ccl/level-1/l1-readloop-lds.lisp
r9602 r9725 96 96 (define-toplevel-command :break q () "return to toplevel" (toplevel)) 97 97 (define-toplevel-command :break r () "list restarts" 98 (format t "~& (:C <n>) can be used to invoke one of the following restarts in this break loop:") 99 (let* ((r (apply #'vector (compute-restarts *break-condition*)))) 100 (dotimes (i (length r) (terpri)) 101 (format *debug-io* "~&~d. ~a" i (svref r i))))) 102 103 ;;; From Marco Baringer 2003/03/18 98 (format *debug-io* "~& (:C <n>) can be used to invoke one of the following restarts in this break loop:") 99 (display-restarts)) 104 100 105 101 (define-toplevel-command :break set (n frame value) "Set <n>th item of frame <frame> to <value>" … … 279 275 (output-stream *standard-output*) 280 276 (break-level *break-level*) 281 (prompt-function #'(lambda (stream) (print-listener-prompt stream t)))) 277 (prompt-function #'(lambda (stream) 278 (when (and *show-available-restarts* *break-condition*) 279 (display-restarts) 280 (setf *show-available-restarts* nil)) 281 (print-listener-prompt stream t)))) 282 282 (let* ((*break-level* break-level) 283 283 (*last-break-level* break-level) … … 285 285 *in-read-loop* 286 286 *** ** * +++ ++ + /// // / - 287 (eof-value (cons nil nil))) 287 (eof-value (cons nil nil)) 288 (*show-available-restarts* (and *show-restarts-on-break* *break-condition*))) 288 289 (declare (dynamic-extent eof-value)) 289 290 (loop … … 565 566 (defvar *break-loop-when-uninterruptable* t) 566 567 (defvar *show-restarts-on-break* #+ccl-0711 t #-ccl-0711 nil) 568 (defvar *show-available-restarts* nil) 567 569 568 570 (defvar *error-reentry-count* 0) … … 611 613 (*backtrace-contexts* (cons context *backtrace-contexts*))) 612 614 (with-toplevel-commands :break 613 (if *show-restarts-on-break* 614 (let ((*print-circle* *error-print-circle*) 615 (*print-level* *backtrace-print-level*) 616 (*print-length* *backtrace-print-length*) 617 ;(*print-pretty* nil) 618 (*print-array* nil)) 619 (format t "~&> Type :POP to abort, or :C <n> to invoke one of the following restarts:") 620 (let* ((r (apply #'vector (compute-restarts *break-condition*)))) 621 (dotimes (i (length r) (terpri)) 622 (format t "~&~d. ~a" i (svref r i))))) 623 (if *continuablep* 615 (if *continuablep* 624 616 (let* ((*print-circle* *error-print-circle*) 625 617 (*print-level* *backtrace-print-level*) … … 629 621 (format t "~&> Type :GO to continue, :POP to abort, :R for a list of available restarts.") 630 622 (format t "~&> If continued: ~A~%" continue)) 631 (format t "~&> Type :POP to abort, :R for a list of available restarts.~%")) )623 (format t "~&> Type :POP to abort, :R for a list of available restarts.~%")) 632 624 (format t "~&> Type :? for other options.") 633 625 (terpri) … … 641 633 (application-ui-operation *application* 642 634 :enter-backtrace-context context) 643 (read-loop :break-level (1+ *break-level*)644 :input-stream *debug-io*645 :output-stream *debug-io*))635 (read-loop :break-level (1+ *break-level*) 636 :input-stream *debug-io* 637 :output-stream *debug-io*)) 646 638 (application-ui-operation *application* :exit-backtrace-context 647 639 context))))))) … … 650 642 651 643 (defun display-restarts (&optional (condition *break-condition*)) 652 (let ((i 0)) 653 (format t "~&[Pretend that these are buttons.]") 654 (dolist (r (compute-restarts condition) i) 655 (format t "~&~a : ~A" i r) 656 (setq i (%i+ i 1))) 657 (fresh-line nil))) 644 (loop 645 for restart in (compute-restarts condition) 646 for count upfrom 0 647 do (format *debug-io* "~&~D. ~A" count restart) 648 finally (fresh-line *debug-io*))) 658 649 659 650 (defun select-restart (n &optional (condition *break-condition*))
Note:
See TracChangeset
for help on using the changeset viewer.
