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

On Fri, Dec 2, 2011 at 8:35 AM, Tom Tromey <> wrote:
>>>>>> "Doug" == Doug Evans <> writes:
> Doug> This patch adds stdio support to gdbserver.
> Doug> It's a revamp of a patch I submitted a fair while ago.
> Doug> E.g. target remote | ssh hostname gdbserver - hello
> Doug> Ok to check in?
> I read the patch, and it seemed reasonable to me; but I don't know
> gdbserver very well.
> I like this idea though.

Here is what I committed.

2011-12-16  Doug Evans  <>

        * NEWS: Add entry for stdio gdbserver.

        * linux-low.c (linux_create_inferior): If stdio connection,
        redirect stdin from /dev/null, stdout to stderr.
        * remote-utils.c (remote_is_stdio): New static global.
        (remote_connection_is_stdio): New function.
        (remote_prepare): Handle stdio connection.
        (remote_open): Ditto.
        (remote_close): Don't close stdin for stdio connections.
        (read_prim,write_prim): New functions.  Replace all calls to
        read/write to these.
        * server.c (main): Watch for "-" argument.  Move call to
        remote_prepare before start_inferior.
        * server.h (STDIO_CONNECTION_NAME): New macro.
        (remote_connection_is_stdio): Declare.

        * gdb.texinfo (Server): Document -/stdio argument to

        * lib/gdbserver-support.exp (gdb_target_cmd): Recognize stdio
        gdbserver output.
        (gdbserver_default_get_remote_address): New function.
        (gdbserver_start): Call gdb,get_remote_address to compute
        to "target remote" command.

Attachment: gdb-111216-gdbserver-stdio-4.patch.txt
Description: Text document

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