Skip to content
Snippets Groups Projects
Commit 9befdffb authored by ram's avatar ram
Browse files

Add INVOKE-TTY-DEBUGGER. Don't try to invoke motif debugger if we didn't

succeed in opening a connection.
parent 6cfefb96
No related branches found
No related tags found
No related merge requests found
......@@ -525,27 +525,31 @@
(multiple-value-bind (shell connection)
(create-interface-shell)
(declare (ignore shell))
(with-motif-connection (connection)
(let ((pane (find-interface-pane condition))
(*current-frame* frame))
(unless pane
(setf pane (create-debugger condition)))
(unless (is-managed pane)
(popup-interface-pane pane))
(setf (dd-info-level *current-debug-display*) *debug-command-level*)
(setf (dd-info-connection *current-debug-display*) connection)
(unwind-protect
(handler-case
(loop
(system:serve-event))
(error (err)
(if *flush-debug-errors*
(interface-error (format nil "~a" err) pane)
(interface-error
"Do not yet support recursive debugging" pane))))
(when (and connection *current-debug-display*)
(with-motif-connection (connection)
(close-motif-debugger condition)))))))))
(if connection
(with-motif-connection (connection)
(let ((pane (find-interface-pane condition))
(*current-frame* frame))
(unless pane
(setf pane (create-debugger condition)))
(unless (is-managed pane)
(popup-interface-pane pane))
(setf (dd-info-level *current-debug-display*)
*debug-command-level*)
(setf (dd-info-connection *current-debug-display*) connection)
(unwind-protect
(handler-case
(loop
(system:serve-event))
(error (err)
(if *flush-debug-errors*
(interface-error (format nil "~a" err) pane)
(interface-error
"Do not yet support recursive debugging"
pane))))
(when (and connection *current-debug-display*)
(with-motif-connection (connection)
(close-motif-debugger condition))))))
(invoke-tty-debugger condition)))))
......@@ -553,6 +557,17 @@
;;;
(defvar *in-windowing-debugger* nil)
;;; INVOKE-TTY-DEBUGGER -- Internal
;;;
;;; Print condition and invoke the TTY debugger.
;;;
(defun invoke-tty-debugger (condition)
(format *error-output* "~2&~A~2&" *debug-condition*)
(unless (typep condition 'step-condition)
(show-restarts *debug-restarts* *error-output*))
(internal-debug))
;;; INVOKE-DEBUGGER -- Public
;;;
;;; Invokes the Lisp debugger. It executes some common debugger setup code
......@@ -578,11 +593,7 @@
(if (or (not (use-graphics-interface))
*in-windowing-debugger*
(typep condition 'xti:toolkit-error))
(progn
(format *error-output* "~2&~A~2&" *debug-condition*)
(unless (typep condition 'step-condition)
(show-restarts *debug-restarts* *error-output*))
(internal-debug))
(invoke-tty-debugger condition)
(let ((*in-windowing-debugger* t))
(write-line "Invoking debugger...")
(invoke-motif-debugger condition)))))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment