From: Eli Zaretskii Date: Fri, 31 Jan 2020 09:34:50 +0000 (+0200) Subject: Allow exiting the Python interpreter of a GDB session X-Git-Tag: emacs-27.0.90~84 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=baceb8e84d;p=emacs.git Allow exiting the Python interpreter of a GDB session * lisp/progmodes/gdb-mi.el (gdb-delchar-or-quit): Send EOF to GDB if we are in an embedded interpreter. This allows to exit from "pi" cleanly. (Bug#39140) --- diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index e4233dacaf6..2978d4a7672 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -1001,8 +1001,10 @@ no input, and GDB is waiting for input." ;; Sending an EOF does not work with GDB-MI; submit an ;; explicit quit command. (progn - (insert "quit") - (comint-send-input t t)) + (if (> gdb-control-level 0) + (process-send-eof proc) + (insert "quit") + (comint-send-input t t))) (delete-char arg)))) (defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.")