GNU bug report logs -
#39140
28.0.50; gdb-mode incorrectly responds to C-d when a python interpreter is running
Previous Next
Reported by: Vladimir Nikishkin <lockywolf <at> gmail.com>
Date: Wed, 15 Jan 2020 01:26:02 UTC
Severity: normal
Found in version 28.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Vladimir Nikishkin <lockywolf <at> gmail.com>
> Date: Wed, 15 Jan 2020 09:25:16 +0800
>
> So, Emacs ships a GDB-mode, runnable by M-x gdb RET
> Inside this inferior gdb session, we can run a python
> interpreter by typing: pi RET
>
> In GDB that is run inside a plain terminal, the C-d command
> (the EOF character) returns from python to the standard GDB
> prompt.
>
> Not so in Emacs. If you type C-d, there is either just:
> `quit>'
> printed, and nothing else, or the line:
> `Use quit() or Ctrl-D (i.e. EOF) to exit'
> However, sending C-q C-d RET, or using the window menu
> `menu-bar signals eof' ends the whole GDB session.
Does the patch below fix the problem?
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index b08d487..d841f74 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -1001,8 +1001,10 @@ gdb-delchar-or-quit
;; 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.")
This bug report was last modified 5 years and 116 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.