From: Nick Roberts <nick@nick.uklinux.net>
To: gdb@sources.redhat.com
Subject: GDB/MI stream separation
Date: Sun, 09 Feb 2003 15:24:00 -0000 [thread overview]
Message-ID: <15942.29137.311799.710079@nick.uklinux.net> (raw)
In-Reply-To: <vt2adhbtd10.fsf@zenia.red-bean.com>
Jim Blandy wrote:
> ...One approach is to use GDB's 'tty' command
> to have the inferior run on a different tty than GDB itself. gdb-ui
> can create a separate process buffer for the inferior's I/O, call
> process-tty-name to get the name of its pseudo-tty, and then pass that
> to GDB's 'tty' command.
I have only seen the tty command work in one direction. That is, I can send
the inferior's output to another terminal/buffer easily enough but I can't
seem to receive its input. I could, however, do omething like:
(defun io-mode ()
"Major mode for io.
\\{comint-mode-map}"
(make-comint "io-process""/bin/cat")
(setq major-mode 'io-mode)
(setq mode-name "Debuggee I/O")
(setq comint-input-sender 'io-sender))
(defun io-sender (proc string)
(let ((gud-proc (get-buffer-process gud-comint-buffer)))
(save-excursion
(set-buffer (process-buffer gud-proc))
(process-send-string gud-proc string)
(process-send-string gud-proc "\n"))))
(gud-def gud-run (concat "-exec-run > "
(process-tty-name (get-process "io-process"))))
so that `>' sends the inferior's output to another buffer and
process-send-string sends the inferior's input back to GDB. This would
not work if the run command was passed to GDB through the GUD buffer.
Stream separation might not be essential but it would be nice to do if there's
an easy way.
Nick
prev parent reply other threads:[~2003-02-09 15:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-04 23:32 Questions about GDB/MI Nick Roberts
2003-02-05 0:18 ` Elena Zannoni
2003-02-05 0:33 ` Daniel Jacobowitz
2003-02-05 14:44 ` Elena Zannoni
2003-02-06 0:44 ` Nick Roberts
2003-02-06 15:26 ` Elena Zannoni
2003-02-05 7:23 ` Jim Blandy
2003-02-05 14:45 ` Elena Zannoni
2003-02-09 15:24 ` Nick Roberts [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15942.29137.311799.710079@nick.uklinux.net \
--to=nick@nick.uklinux.net \
--cc=gdb@sources.redhat.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox