slightly better handling of read errors in the debugger
authorChristophe Rhodes <csr21@cantab.net>
Sun, 2 Jun 2013 18:50:05 +0000 (19:50 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Sun, 2 Jun 2013 18:50:05 +0000 (19:50 +0100)
wrap the read as well as the eval in the WITH-SIMPLE-RESTART ABORT
so that the user can return to the existing debugger level on read
errors.

src/code/debug.lisp

index df913ba..150e306 100644 (file)
@@ -1106,11 +1106,11 @@ and LDB (the low-level debugger).  See also ENABLE-DEBUGGER."
              (flush-standard-output-streams)
              (debug-prompt *debug-io*)
              (force-output *debug-io*)
-             (let* ((exp (debug-read *debug-io*))
-                    (cmd-fun (debug-command-p exp restart-commands)))
-               (with-simple-restart (abort
-                                     "~@<Reduce debugger level (to debug level ~W).~@:>"
-                                     level)
+             (with-simple-restart (abort
+                                   "~@<Reduce debugger level (to debug level ~W).~@:>"
+                                   level)
+               (let* ((exp (debug-read *debug-io*))
+                      (cmd-fun (debug-command-p exp restart-commands)))
                  (cond ((not cmd-fun)
                         (debug-eval-print exp))
                        ((consp cmd-fun)