From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7521 invoked by alias); 28 Feb 2010 22:30:54 -0000 Received: (qmail 7507 invoked by uid 22791); 28 Feb 2010 22:30:53 -0000 X-Spam-Check-By: sourceware.org Received: from pool-173-48-46-17.bstnma.fios.verizon.net (HELO cgf.cx) (173.48.46.17) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Sun, 28 Feb 2010 22:30:48 +0000 Received: from ednor.cgf.cx (ednor.casa.cgf.cx [192.168.187.5]) by cgf.cx (Postfix) with ESMTP id F3E9913C0D0 for ; Sun, 28 Feb 2010 17:30:46 -0500 (EST) Received: by ednor.cgf.cx (Postfix, from userid 201) id E5BE42B352; Sun, 28 Feb 2010 17:30:46 -0500 (EST) Date: Sun, 28 Feb 2010 22:30:00 -0000 From: Christopher Faylor To: gdb-patches@sourceware.org Subject: Re: [RFA] windows-nat.c: Cygwin: Port to Cygwin 1.7 Message-ID: <20100228223046.GD29104@ednor.casa.cgf.cx> Mail-Followup-To: gdb-patches@sourceware.org References: <20100228150844.GH5683@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100228150844.GH5683@calimero.vinschen.de> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-02/txt/msg00712.txt.bz2 On Sun, Feb 28, 2010 at 04:08:44PM +0100, Corinna Vinschen wrote: >Hi, > >the below patch ports GDB to the latest Cygwin version 1.7. > >Three problems have to be fixed: > >- The maximum path length in Cygwin is no longer MAX_PATH. Rather it > is PATH_MAX, which is now 4096. Actually, even paths up to 32K are > supported, which is the maximum path length of the underlying Windows, > but usually 4K is more than enough. > >- The aforementioned change required to provide a new Win32<->POSIX > path conversion API which allows to handle paths longer than MAX_PATH. > The old cygwin_conv_to_[full_]win32_path and cygwin_conf_to_[full_]posix > path functions are deprecated now. The below patch uses the new > cygwin_conv_path API instead. > >- The Windows ANSI functions have two drawbacks. > > - They return paths always in the default ANSI codepage, which is > typically not the default codeset used in Cygwin 1.7 anymore. UTF-8 > is now the default codeset in Cygwin. > > - They are restricted to a path length of MAX_PATH bytes. > > Since UTF-8 support and support for long paths are key changes in > Cygwin 1.7, Cygwin now uses only Unicode Windows or native NT > functions internally. To overcome the restrictions of the Win32 ANSI > functions in GDB as well, the patch changes the affected calls to use > the Unicode variation instead, too. > >The code for other Win32 targets is unaffected by this patch, except >for a patch in get_image_name. The WideCharToMultiByte function is >called with an incorrect target buffer size. > >Ok to apply? They look reasonable. I've had less comprehensive changes sitting in my sandbox for a while. Please apply. cgf