This is the mail archive of the
mailing list for the GDB project.
Re: [RFA] stdio gdbserver connection
- From: Tom Tromey <tromey at redhat dot com>
- To: dje at google dot com (Doug Evans)
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 08 Jun 2010 11:16:50 -0600
- Subject: Re: [RFA] stdio gdbserver connection
- References: <20100525172715.A9BE38439A@ruffy.mtv.corp.google.com>
- Reply-to: tromey at redhat dot com
>>>>> "Doug" == Doug Evans <email@example.com> writes:
Doug> This patch lets gdbserver communicate via stdio.
I didn't see any response to this.
I think this seems like a useful feature. I'm not familiar with
gdbserver's code, so I won't really review the patch.
Doug> One outstanding issue is what to do with inferior stdio. stderr
Doug> is ok, it'll just get propagated back to gdb which will display
Doug> it. But we don't want inferior stdio to interfere with the gdb
Doug> connection. The board description file uses exec-wrapper to
Doug> redirect stdin/out to /dev/null. I think gdbserver should do that
Doug> itself if the connection is stdio. If the user wants something
Doug> else for the inferior's stdio (named pipes or whatever), they can
Doug> still use exec-wrapper. Comments?
This seems reasonable. It seems like it might also be reasonable to
have the default be to route the inferior's stdout to stderr (by
default), so plain printfs continue to show up.
I think it would be worthwhile to check in this board file. I believe
this has come up before -- there are some files like this that are
useful but not yet in the tree...
Doug> +#define STDIN_FILENO 0
Doug> +#define STDOUT_FILENO 1
Old school :-)
How about fileno(stdin)?