emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 baceb8e: Allow exiting the Python interpreter of a GDB session


From: Eli Zaretskii
Subject: emacs-27 baceb8e: Allow exiting the Python interpreter of a GDB session
Date: Fri, 31 Jan 2020 04:36:11 -0500 (EST)

branch: emacs-27
commit baceb8e84d350bd8f981ff8289381ec55887c970
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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)
---
 lisp/progmodes/gdb-mi.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index e4233da..2978d4a 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.")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]