From: Eli Zaretskii <eliz@gnu.org>
To: Cleber Rosa <crosa@redhat.com>
Cc: gdb-patches@sourceware.org, areis@redhat.com, palves@redhat.com,
crosa@redhat.com
Subject: Re: [PATCH 1/4] GDB: inferior standard I/O redirection
Date: Mon, 05 Oct 2015 12:23:00 -0000 [thread overview]
Message-ID: <83h9m5zepu.fsf@gnu.org> (raw)
In-Reply-To: <1444045617-14526-2-git-send-email-crosa@redhat.com>
> From: Cleber Rosa <crosa@redhat.com>
> Cc: areis@redhat.com, palves@redhat.com, Cleber Rosa <crosa@redhat.com>
> Date: Mon, 5 Oct 2015 08:46:54 -0300
>
> This introduces a set of commands:
>
> * set inferior-stdin (aliased as stdin)
> * set inferior-stdout (aliased as stdout)
> * set inferior-stderr (aliased as stderr)
Thanks.
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -42,6 +42,21 @@ set remote multiprocess-extensions-packet
> show remote multiprocess-extensions-packet
> Set/show the use of the remote protocol multiprocess extensions.
>
> +set inferior-stdin
> +stdin
> +show inferior-stdin
> + Set/show the standard input for the program being debugged.
> +
> +set inferior-stdout
> +stdout
> +show inferior-stdout
> + Set/show the standard output for the program being debugged.
> +
> +set inferior-stderr
> +stderr
> +show inferior-stderr
> + Set/show the standard error for the program being debugged.
> +
This part is OK.
> +When you use the @code{tty} command or redirect input using either
> +@code{stdin}/@code{stdout}/@code{stderr} or the @code{run} command,
> +only the input @emph{for your program} is affected. The input for
> +@value{GDBN} still comes from your terminal and from the original
> +standard I/O channels. @code{tty} is an alias for @code{set
> +inferior-tty}.
It is strange to talk about redirecting input, when the description
also includes stdout and stderr. Did you really mean only input here?
> + add_setshow_filename_cmd ("inferior-stdin", class_run,
> + &inferior_io_std_scratch[0], _("\
> +Set standard input for future runs of program being debugged."), _("\
This correctly says that the effect of these commands is only for
_future_ runs of the inferior, but the text in the manual completely
omits this important detail, so the reader could think we have some
magical way of redirecting I/O of an already running program.
The documentation is OK with those gotchas fixed.
Thanks.
next prev parent reply other threads:[~2015-10-05 12:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-05 11:47 [PATCH 0/4]: " Cleber Rosa
2015-10-05 11:47 ` [PATCH 2/4] GDB/MI: fix and simplify mi_valid_noargs utility function Cleber Rosa
2015-10-21 11:19 ` Pedro Alves
2015-10-05 11:47 ` [PATCH 1/4] GDB: inferior standard I/O redirection Cleber Rosa
2015-10-05 12:23 ` Eli Zaretskii [this message]
2015-10-21 11:18 ` Pedro Alves
2015-10-05 11:47 ` [PATCH 3/4] GDB/MI: add test for command -inferior-tty-show Cleber Rosa
2015-10-21 11:19 ` Pedro Alves
2015-10-05 11:54 ` [PATCH 4/4] GDB/MI: inferior standard I/O redirection Cleber Rosa
2015-10-05 12:26 ` Eli Zaretskii
2015-10-21 11:19 ` Pedro Alves
2015-10-22 10:55 ` Vladimir Prus
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=83h9m5zepu.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=areis@redhat.com \
--cc=crosa@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@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