[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
D.9.6 Console I/O
By default and if not explicitly closed by the target system, the file
descriptors 0, 1 and 2 are connected to the No value for GDBN console. Output
on the No value for GDBN console is handled as any other file output operation
(write(1, …)
or write(2, …)
). Console input is handled
by No value for GDBN so that after the target read request from file descriptor
0 all following typing is buffered until either one of the following
conditions is met:
-
The user types Ctrl-c. The behaviour is as explained above, and the
read
system call is treated as finished. - The user presses <RET>. This is treated as end of input with a trailing newline.
- The user types Ctrl-d. This is treated as end of input. No trailing character (neither newline nor ‘Ctrl-D’) is appended to the input.
If the user has typed more characters than fit in the buffer given to
the read
call, the trailing characters are buffered in No value for GDBN until
either another read(0, …)
is requested by the target, or debugging
is stopped at the user's request.