From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21268 invoked by alias); 12 Apr 2006 18:39:00 -0000 Received: (qmail 21259 invoked by uid 22791); 12 Apr 2006 18:38:59 -0000 X-Spam-Check-By: sourceware.org Received: from intranet.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.6) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 12 Apr 2006 18:38:58 +0000 Received: (qmail 24802 invoked from network); 12 Apr 2006 18:38:56 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 12 Apr 2006 18:38:56 -0000 To: Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: Add 'target |' support for MinGW References: From: Jim Blandy Date: Wed, 12 Apr 2006 18:39:00 -0000 In-Reply-To: (Eli Zaretskii's message of "Wed, 12 Apr 2006 10:52:51 +0300") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00152.txt.bz2 Eli Zaretskii writes: >> From: Jim Blandy >> Date: Wed, 12 Apr 2006 00:04:44 -0700 >> >> src/gdb/ChangeLog: >> 2006-04-11 Jim Blandy >> >> 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.