This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] stdio gdbserver connection

>>>>> "Doug" == Doug Evans <> 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)?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]