[PATCH 4/4] GDB/MI: inferior standard I/O redirection

Vladimir Prus vladimir.prus@gmail.com
Thu Oct 22 10:55:00 GMT 2015


Cleber, thanks for the patch! And thanks Pedro for the CC.

On 05-Oct-15 2:46 PM, Cleber Rosa wrote:
 > This introduces the following MI commands:
 >
 >   * -inferior-stdin-set
 >   * -inferior-stdin-show
 >   * -inferior-stdout-set
 >   * -inferior-stdout-show
 >   * -inferior-stderr-set
 >   * -inferior-stderr-show
 >
 > Which are the MI version of the inferior standard I/O redirection
 > commands:
 >
 >   * set inferior-stdin (aliased as stdin)
 >   * show inferior-stdin
 >   * set inferior-stdout (aliased as stdout)
 >   * show inferior-stdout
 >   * set inferior-stderr (aliased as stderr)

These additions look non-controversial to me.


 > +@subheading The @code{-inferior-stdin-set} Command
 > +@findex -inferior-stdin-set
 > +
 > +@subheading Synopsis
 > +
 > +@smallexample
 > +-inferior-stdin-set /tmp/answers
 > +@end smallexample
 > +
 > +Set standard input for future runs of the program being debugged.

This documentation does not specify what the parameter to the command is. Is this something you can write
explicitly, so that one does not have to consult CLI docs? It seems you need a filepath, in which case
writing

+@smallexample
+-inferior-stdin-set <filepath>
+@end smallexample

might be clearer (I don't remember texinfo syntax for replaceable part).

Do we want to support passing integer file descriptor here as well?

Thanks,
Volodya

-- 
Vladimir Prus
http://vladimirprus.com



More information about the Gdb-patches mailing list