This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] windows-nat.c: Cygwin: Port to Cygwin 1.7
- From: Christopher Faylor <cgf-use-the-mailinglist-please at sourceware dot org>
- To: gdb-patches at sourceware dot org
- Date: Sun, 28 Feb 2010 17:30:46 -0500
- Subject: Re: [RFA] windows-nat.c: Cygwin: Port to Cygwin 1.7
- References: <20100228150844.GH5683@calimero.vinschen.de>
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