6.1.4 Your Program's Input and Output
By default, the program you run under DDD does input and output to the
debugger console. Normally, you can redirect your program's input
and/or output using "shell redirections" with the arguments--that is,
additional arguments like `< INPUT' or `> OUTPUT'. You can enter these
shell redirections just like other arguments (Note: Arguments).
_Warning:_ While input and output redirection work, you cannot use
pipes to pass the output of the program you are debugging to another
program; if you attempt this, DDD may wind up debugging the wrong
program. Note: Attaching to a Process, for an alternative.
If command output is sent to the debugger console, it is impossible
for DDD to distinguish between the output of the debugged program and
the output of the inferior debugger.
Program output that confuses DDD includes:
* Primary debugger prompts (e.g. `(gdb) ', `(dbx) ' or `(ladebug) ')
* Secondary debugger prompts (e.g. `>')
* Confirmation prompts (e.g. `(y or n) ')
* Prompts for more output (e.g. `Press RETURN to continue')
* Display output (e.g. `$pc = 0x1234')
If your program outputs any of these strings, you may encounter
problems with DDD mistaking them for debugger output. These problems
can easily be avoided by redirecting program I/O, for instance to the
separate execution window (Note: Using the Execution Window).
If the inferior debugger changes the default TTY settings, for
instance through a `stty' command in its initialization file, DDD may
also become confused. The same applies to debugged programs which
change the default TTY settings.
The behavior of the debugger console can be controlled using the
-- Resource: lineBufferedConsole (class LineBuffered)
If this is `on' (default), each line from the inferior debugger is
output on each own, such that the final line is placed at the
bottom of the debugger console. If this is `off', all lines are
output as a whole. This is faster, but results in a random
position of the last line.
automatically generated by info2www version 18.104.22.168