* 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)
;; 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.")