bug#65007: Allow displaying program IO in the GDB buffer

* lisp/progmodes/gdb-mi.el (gdb-split-io-flag): Don't create
IO buffer if `gdb-split-io-flag' is nil.
(gdb-split-io-flag): New user option.

Copyright-paperwork-exempt: yes
This commit is contained in:
StrawberryTea 2023-09-16 01:08:44 -05:00 committed by Eli Zaretskii
parent a5ca1f2d8b
commit ce77bfff50

View file

@ -1098,9 +1098,10 @@ detailed description of this mode.
(if gdb-debuginfod-enable "on" "off"))
'gdb-debuginfod-message)
(gdb-get-buffer-create 'gdb-inferior-io)
(gdb-clear-inferior-io)
(gdb-inferior-io--init-proc (get-process "gdb-inferior"))
(when gdb-display-io-buffer
(gdb-get-buffer-create 'gdb-inferior-io)
(gdb-clear-inferior-io)
(gdb-inferior-io--init-proc (get-process "gdb-inferior")))
(when (eq system-type 'windows-nt)
;; Don't create a separate console window for the debuggee.
@ -1828,6 +1829,13 @@ this trigger is subscribed to `gdb-buf-publisher' and called with
:group 'gdb
:version "25.1")
(defcustom gdb-display-io-buffer t
"When non-nil, display the `gdb-inferior-io' buffer. Otherwise,
send program output to the GDB buffer."
:type 'boolean
:group 'gdb
:version "30.1")
(defun gdb-inferior-filter (proc string)
(unless (string-equal string "")
(let (buf)