redirect

Redirects I/O streams of the current target process.

Syntax
redirect <stream> <destination>
Options

The following table lists and defines options of the red command.

Table 1. red Command-line debugger command - Options
Command Description
<stream> stdout | stderr | both
<destination> stop | server <port> | socket [<host>] <port>
<port> TCP/IP port number of destination socket.
<host> IP4 address or IP6 address or hostname of target system. Assumed to be "localhost" if omitted.
stop Ends redirection for the specified stream(s).
server Attempts to establish a server socket on the specified port. Client sockets may connect to this server socket and read the redirected data. Data written by the target while no client is connected is discarded.
socket Attempts to connect to the specified server socket. All target output data is written to this connection.
Examples

The following table lists and defines examples of the red command.

Table 2. red Command-line debugger command - Examples
Command Description
redirect stdout server 27018 Redirects output of stdout for the current process to a server socket on local port 27018.
redirect stderr socket logmachine.com 22018 Attempts to connect to the server socket at port 22018 on host "logmachine.com" and redirects output of stderr for the current process to that connection.
redirect both stop Ends redirection (if any) currently in place for both stdout and stderr for the current process.