X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdebug.lisp;h=dde5f757fd9113962a199cd8675aa5680a267568;hb=212ef8043aeaceaa627f2924e04554fbc37b8ee1;hp=7711c5021f9c6f9782fc52c4e9b5b97c88d9af08;hpb=6df93cdd503b613151de9c82982259b558465915;p=sbcl.git diff --git a/src/code/debug.lisp b/src/code/debug.lisp index 7711c50..dde5f75 100644 --- a/src/code/debug.lisp +++ b/src/code/debug.lisp @@ -637,12 +637,18 @@ 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* + #!+sb-show (sb!kernel:show-condition *debug-condition* *error-output*) (format *error-output* "~2&debugger invoked on condition of type ~S:~% " @@ -710,7 +716,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.