From: StrawberryTea <look@strawberrytea.xyz>
To: 65007@debbugs.gnu.org
Subject: bug#65007: [PATCH] Allow displaying program IO in the GDB buffer.
Date: Thu, 27 Jul 2023 20:33:39 -0400 [thread overview]
Message-ID: <cz066o3x.fsf@strawberrytea.xyz> (raw)
* gdb-mi.el: Add new customizable variable `gdb-split-io-flag'.
This change allows the user to control whether program IO is displayed
in the GDB buffer or in a separate buffer. The default is to display it
in the the `gdb-inferior-io' buffer.
---
lisp/progmodes/gdb-mi.el | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index a1091de43e9..8f4f06abb9a 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -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-split-io-flag
+ (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,15 @@ this trigger is subscribed to `gdb-buf-publisher' and called with
:group 'gdb
:version "25.1")
+(defcustom gdb-split-io-flag t
+ "Non-nil means to split the program's I/O from the GDB buffer.
+
+If t, create the `gdb-inferior-io' buffer and redirect the
+program's I/O to it."
+ :type 'boolean
+ :group 'gdb
+ :version "30.1")
+
(defun gdb-inferior-filter (proc string)
(unless (string-equal string "")
(let (buf)
--
2.41.0
next reply other threads:[~2023-07-28 0:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 0:33 StrawberryTea [this message]
2023-08-02 13:38 ` bug#65007: [PATCH] Allow displaying program IO in the GDB buffer Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-26 18:37 ` StrawberryTea
2023-08-27 8:01 ` Eli Zaretskii
2023-09-15 6:52 ` Eli Zaretskii
2023-09-16 5:38 ` StrawberryTea
2023-09-16 6:05 ` Eli Zaretskii
2023-09-16 6:08 ` StrawberryTea
2023-09-16 10:44 ` Eli Zaretskii
2023-09-18 4:14 ` StrawberryTea
2023-09-18 10:56 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cz066o3x.fsf@strawberrytea.xyz \
--to=look@strawberrytea.xyz \
--cc=65007@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).