This is the mail archive of the gdb-patches@sourceware.org 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: Add 'target |' support for MinGW


Eli Zaretskii <eliz@gnu.org> writes:
>> From: Jim Blandy <jimb@codesourcery.com>
>> Date: Wed, 12 Apr 2006 00:04:44 -0700
>> 
>> src/gdb/ChangeLog:
>> 2006-04-11  Jim Blandy  <jimb@codesourcery.com>
>> 
>> 	Add support for 'target remote |' on MinGW.
>> 	* ser-mingw.c (struct pipe_state): New structure.
>> 	(make_pipe_state, free_pipe_state, cleanup_pipe_state)
>> 	(pipe_windows_open, pipe_windows_close, pipe_windows_read)
>> 	(pipe_windows_write, pipe_wait_handle): New functions.
>> 	(_initialize_ser_windows): Register a "pipe" interface based on
>> 	them.
>
> Thanks.
>
>> +    const char *err_msg
>> +      = pex_run (ps->pex, PEX_SEARCH | PEX_BINARY_INPUT | PEX_BINARY_OUTPUT,
>> +                 argv[0], argv, NULL, NULL,
>> +                 &err);
>> [...]
>> +  DWORD bytes_read;
>> +  if (! ReadFile (pipeline_out, scb->buf, count, &bytes_read, NULL))
>> +    return -1;
>> [...]
>> +  DWORD written;
>> +  if (! WriteFile (pipeline_in, buf, count, &written, NULL))
>> +    return -1;
>
> Do we really want binary I/O in _all_ situations?  Can it be that,
> depending on the command on the other side of the pipe, someone would
> like the CR characters to be stripped from the EOLs in the incoming
> stuff?  The way you wrote it, AFAICS, binary I/O is always used, no
> matter what.

Well, the pipe is carrying the GDB remote protocol, which is happier
with binary.


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