I like this one too; but I'm not sure that I like linking it to the
remote-syscall interface. Implementation-wise, that's the most useful
method for a stub like RedBoot; but for a larger system like gdbserver,
it's useful to allocate the program a normal pseudo-terminal as if it
had a console. And to do character rather than line I/O.
As I'm sure Andrew will remind me, my suggestion doesn't fit the
current remote protocol very well; it's not synchronous enough for one
thing. So don't take this as an objection, and I'll come back to
proper remote console support a little later. This'll be a nice
starting point.