Commit ed37f038 authored by Eli Zaretskii's avatar Eli Zaretskii

Fix sending signals and EOF to the inferior process in gdb-mi.el

* lisp/progmodes/gdb-mi.el (gdb-io-interrupt, gdb-io-quit)
(gdb-io-stop, gdb-io-eof): Send signal/EOF to the inferior
process, not to GDB.  (Bug#40210)
parent 82f8bee7
...@@ -1729,25 +1729,25 @@ this trigger is subscribed to `gdb-buf-publisher' and called with ...@@ -1729,25 +1729,25 @@ this trigger is subscribed to `gdb-buf-publisher' and called with
"Interrupt the program being debugged." "Interrupt the program being debugged."
(interactive) (interactive)
(interrupt-process (interrupt-process
(get-buffer-process gud-comint-buffer) comint-ptyp)) (get-buffer-process (gdb-get-buffer-create 'gdb-inferior-io)) comint-ptyp))
(defun gdb-io-quit () (defun gdb-io-quit ()
"Send quit signal to the program being debugged." "Send quit signal to the program being debugged."
(interactive) (interactive)
(quit-process (quit-process
(get-buffer-process gud-comint-buffer) comint-ptyp)) (get-buffer-process (gdb-get-buffer-create 'gdb-inferior-io)) comint-ptyp))
(defun gdb-io-stop () (defun gdb-io-stop ()
"Stop the program being debugged." "Stop the program being debugged."
(interactive) (interactive)
(stop-process (stop-process
(get-buffer-process gud-comint-buffer) comint-ptyp)) (get-buffer-process (gdb-get-buffer-create 'gdb-inferior-io)) comint-ptyp))
(defun gdb-io-eof () (defun gdb-io-eof ()
"Send end-of-file to the program being debugged." "Send end-of-file to the program being debugged."
(interactive) (interactive)
(process-send-eof (process-send-eof
(get-buffer-process gud-comint-buffer))) (get-buffer-process (gdb-get-buffer-create 'gdb-inferior-io))))
(defun gdb-clear-inferior-io () (defun gdb-clear-inferior-io ()
(with-current-buffer (gdb-get-buffer-create 'gdb-inferior-io) (with-current-buffer (gdb-get-buffer-create 'gdb-inferior-io)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment