aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStrawberryTea2023-09-16 01:08:44 -0500
committerEli Zaretskii2023-09-16 13:30:33 +0300
commitce77bfff50351b493f22cb3fdf3bf8d134e46141 (patch)
tree898ae753a2ba69883efc935a0a9e48c32e61a799
parenta5ca1f2d8b5785d0e7b1dd9ccd87b6690e984c7a (diff)
downloademacs-ce77bfff50351b493f22cb3fdf3bf8d134e46141.tar.gz
emacs-ce77bfff50351b493f22cb3fdf3bf8d134e46141.zip
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
-rw-r--r--lisp/progmodes/gdb-mi.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 42c1c715c73..8ce5df6e0c7 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -1098,9 +1098,10 @@ detailed description of this mode.
1098 (if gdb-debuginfod-enable "on" "off")) 1098 (if gdb-debuginfod-enable "on" "off"))
1099 'gdb-debuginfod-message) 1099 'gdb-debuginfod-message)
1100 1100
1101 (gdb-get-buffer-create 'gdb-inferior-io) 1101 (when gdb-display-io-buffer
1102 (gdb-clear-inferior-io) 1102 (gdb-get-buffer-create 'gdb-inferior-io)
1103 (gdb-inferior-io--init-proc (get-process "gdb-inferior")) 1103 (gdb-clear-inferior-io)
1104 (gdb-inferior-io--init-proc (get-process "gdb-inferior")))
1104 1105
1105 (when (eq system-type 'windows-nt) 1106 (when (eq system-type 'windows-nt)
1106 ;; Don't create a separate console window for the debuggee. 1107 ;; 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
1828 :group 'gdb 1829 :group 'gdb
1829 :version "25.1") 1830 :version "25.1")
1830 1831
1832(defcustom gdb-display-io-buffer t
1833 "When non-nil, display the `gdb-inferior-io' buffer. Otherwise,
1834send program output to the GDB buffer."
1835 :type 'boolean
1836 :group 'gdb
1837 :version "30.1")
1838
1831(defun gdb-inferior-filter (proc string) 1839(defun gdb-inferior-filter (proc string)
1832 (unless (string-equal string "") 1840 (unless (string-equal string "")
1833 (let (buf) 1841 (let (buf)