X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdebug.lisp;h=b7709e1fe6e042d7205e83451d72acb0d8ef1a6f;hb=2abf77f6c4c559a3e5b7fc351a4743305381feb6;hp=7711c5021f9c6f9782fc52c4e9b5b97c88d9af08;hpb=6df93cdd503b613151de9c82982259b558465915;p=sbcl.git diff --git a/src/code/debug.lisp b/src/code/debug.lisp index 7711c50..b7709e1 100644 --- a/src/code/debug.lisp +++ b/src/code/debug.lisp @@ -637,13 +637,17 @@ reset to ~S." (*print-pretty* t) (*package* original-package)) + ;; Before we start our own output, finish any pending output. + ;; Otherwise, if the user tried to track the progress of + ;; his program using PRINT statements, he'd tend to lose + ;; the last line of output or so, and get confused. + (flush-standard-output-streams) + ;; The initial output here goes to *ERROR-OUTPUT*, because the ;; initial output is not interactive, just an error message, ;; and when people redirect *ERROR-OUTPUT*, they could ;; reasonably expect to see error messages logged there, ;; regardless of what the debugger does afterwards. - #!+sb-show (sb!conditions::show-condition *debug-condition* - *error-output*) (format *error-output* "~2&debugger invoked on condition of type ~S:~% " (type-of *debug-condition*)) @@ -710,7 +714,7 @@ reset to ~S." ;;; This calls DEBUG-LOOP, performing some simple initializations ;;; before doing so. INVOKE-DEBUGGER calls this to actually get into -;;; the debugger. SB!CONDITIONS::ERROR-ERROR calls this in emergencies +;;; the debugger. SB!KERNEL::ERROR-ERROR calls this in emergencies ;;; to get into a debug prompt as quickly as possible with as little ;;; risk as possible for stepping on whatever is causing recursive ;;; errors.