Hi all,
After more investigation, I am wondering whether there is a conflict
between 2 entities reading for stdin:
- one is initialized by qemu_chr_open_stdio() (in qemu-char.c)
- the 2nd one is the handling of SYS_READ in arm-semi.c
After some debug/tracing, I have noticed that a few chars a swallowed
from stdin by calls to stdio_read() because the stdin FD is monitored by
the select() call in main_loop_wait().
This seems to be in conflict with the ARM semihosting support for
SYS_READ which also tries to read FD 0.
If I remove the call to
qemu_set_fd_handler2(0, stdio_read_poll, stdio_read, NULL, chr);
in qemu_chr_open_stdio() then my sample test works, but I wonder what I
might have broken?
Thanks and best regards,
Christophe.