From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71453 invoked by alias); 5 Oct 2015 12:23:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 71443 invoked by uid 89); 5 Oct 2015 12:23:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout21.012.net.il Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 05 Oct 2015 12:23:29 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NVQ00K00XX1CZ00@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Mon, 05 Oct 2015 15:23:26 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NVQ00K2OYF2BM50@a-mtaout21.012.net.il>; Mon, 05 Oct 2015 15:23:26 +0300 (IDT) Date: Mon, 05 Oct 2015 12:23:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH 1/4] GDB: inferior standard I/O redirection In-reply-to: <1444045617-14526-2-git-send-email-crosa@redhat.com> To: Cleber Rosa Cc: gdb-patches@sourceware.org, areis@redhat.com, palves@redhat.com, crosa@redhat.com Reply-to: Eli Zaretskii Message-id: <83h9m5zepu.fsf@gnu.org> References: <1444045617-14526-1-git-send-email-crosa@redhat.com> <1444045617-14526-2-git-send-email-crosa@redhat.com> X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00035.txt.bz2 > From: Cleber Rosa > Cc: areis@redhat.com, palves@redhat.com, Cleber Rosa > 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.