From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29050 invoked by alias); 26 Mar 2005 02:09:00 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28200 invoked from network); 26 Mar 2005 02:08:50 -0000 Received: from unknown (HELO cgf.cx) (66.30.17.189) by sourceware.org with SMTP; 26 Mar 2005 02:08:50 -0000 Received: by cgf.cx (Postfix, from userid 201) id BBBCC13C32A; Fri, 25 Mar 2005 21:08:50 -0500 (EST) Date: Sat, 26 Mar 2005 02:09:00 -0000 From: Christopher Faylor To: Mark Mitchell , gdb-patches@sources.redhat.com Subject: Re: PATCH: Windows sockets Message-ID: <20050326020850.GA19864@trixie.casa.cgf.cx> Mail-Followup-To: Mark Mitchell , gdb-patches@sources.redhat.com References: <200503260127.j2Q1R59a022152@sethra.codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200503260127.j2Q1R59a022152@sethra.codesourcery.com> User-Agent: Mutt/1.5.6i X-SW-Source: 2005-03/txt/msg00332.txt.bz2 On Fri, Mar 25, 2005 at 05:27:05PM -0800, Mark Mitchell wrote: >Here's the first "interesting" patch for Windows support. This patch >modifies ser-tcp.c to support Windows, so that we can use a GDB >running on Windows to talk to a gdbserver process. > >Here is a sumary of the changes in this patch: > >1. Link with -lws2_32 on MinGW so we can use sockets. > >2. In defs.h, define WINAPI so that source files know whether they are > supposed to use the Windows API. > >3. Move ser_unix_readchar and friends (which were only barely > UNIX-specific) into ser-base.c, renaming appropriately. > >4. Add a new member (read_prim) to struct serial_ops, and use it from > ser_base_readchar. The reason for this is that sockets must be > read with "recv" on Windows; plain "read" does not work. So, we > need a way to indicate which low-level primitive to use to read > from a file descriptor. > >5. Make a handful of minor changes to ter-tcp.c to account for > differences in the BSD and Windows sockets APIs. > >6. Tweak safe_strerror to deal with Windows sockets error codes. > >Tested on x86_64-unknown-linux-gnu, to make sure I didn't break UNIX, >and cursorily on Windows (with other patches, not yet submitted). > >OK to apply? The windows-specific configury parts look ok to me. That's all I can approve, although the other bits look right too. cgf