aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2020-01-31 11:34:50 +0200
committerEli Zaretskii2020-01-31 11:34:50 +0200
commitbaceb8e84d350bd8f981ff8289381ec55887c970 (patch)
tree3b67e8bee28fb3effd99555bc21e70eb2a305655
parent2e66013dcf1e139436cc806725e0b04945be55a9 (diff)
downloademacs-baceb8e84d350bd8f981ff8289381ec55887c970.tar.gz
emacs-baceb8e84d350bd8f981ff8289381ec55887c970.zip
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)
-rw-r--r--lisp/progmodes/gdb-mi.el6
1 files changed, 4 insertions, 2 deletions
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."
1001 ;; Sending an EOF does not work with GDB-MI; submit an 1001 ;; Sending an EOF does not work with GDB-MI; submit an
1002 ;; explicit quit command. 1002 ;; explicit quit command.
1003 (progn 1003 (progn
1004 (insert "quit") 1004 (if (> gdb-control-level 0)
1005 (comint-send-input t t)) 1005 (process-send-eof proc)
1006 (insert "quit")
1007 (comint-send-input t t)))
1006 (delete-char arg)))) 1008 (delete-char arg))))
1007 1009
1008(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") 1010(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.")