From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4180 invoked by alias); 18 Dec 2013 11:20:51 -0000 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 Received: (qmail 4164 invoked by uid 89); 18 Dec 2013 11:20:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 18 Dec 2013 11:20:49 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id A423C1A082F; Wed, 18 Dec 2013 12:20:45 +0100 (CET) Date: Wed, 18 Dec 2013 11:20:00 -0000 From: Corinna Vinschen To: gdb-patches@sourceware.org Subject: Re: [RFA] Fix cygwin compilation failure due to nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing Message-ID: <20131218112045.GQ30010@calimero.vinschen.de> Reply-To: gdb-patches@sourceware.org Mail-Followup-To: gdb-patches@sourceware.org References: <52ab8d0e.8aa2420a.30ff.ffffd8f1SMTPIN_ADDED_BROKEN@mx.google.com> <52AF3493.9090708@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ogUXNSQj4OI1q3LQ" Content-Disposition: inline In-Reply-To: <52AF3493.9090708@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00697.txt.bz2 --ogUXNSQj4OI1q3LQ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1606 On Dec 16 17:12, Pedro Alves wrote: > On 12/13/2013 10:37 PM, Pierre Muller wrote: > > Following this thread > > https://sourceware.org/ml/gdb-patches/2013-12/msg00073.html > >=20 > > The patch > > https://sourceware.org/ml/gdb-cvs/2013-12/msg00054.html > >=20 > > introduced a failure for cygwin native build. > > The problem is that __USEWIDE is not considered in the patch. > >=20 > > The patch below fixes this compilation error > > and should allow cygwin to work as mingw. >=20 > Looks fine to me. >=20 > (Though I wonder why not just use GetModuleFileNameExA > explicitly. In fact, it's what gdbserver does). Maybe I'm a bit late, but I'd like to chime in here. Don't use GetModuleFileNameExA, use GetModuleFileNameExW. In theory, you should never use the ANSI API on Windows, unless you're still building GDB for Windows 9x, which should be really, really dead by now, hopefully. The reasons are: - The ANSI API only supports a single- or doublebyte codeset in almost all language versions of Windows. There are only a handful languages which are using UTF-8 as ANSI codeset on Windows, most use something like CP1252 or some other codeset which is not capable of handling all UNICODE characters. - The ANSI API restricts filenames to MAX_PATH (260) characters, while the UNICODE API and the underlying OS allow paths of up to 32K. Cygwin is using the UNICODE and native NT APIs exclusively, so paths in Cygwin are only restricted by the maximum OS capability of 32K, and the influence of the PATH_MAX setting of 4096. Corinna --=20 Corinna Vinschen Cygwin Maintainer Red Hat --ogUXNSQj4OI1q3LQ Content-Type: application/pgp-signature Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQIcBAEBAgAGBQJSsYUNAAoJEPU2Bp2uRE+gx0AP/0XhjqClvzq8W/6tM95YkiZB TYo1R2G3kjl62Qc7O9cYDUcTZ2v9fcj0+kkAUfh9MMTvB458JNFvZGflRctliire AzHrkj6X0zoOvq7S+fYESgL+RHvxcKTFMP2U4huWcBum+uGsZvALys9h4TSuC3tD JaB+t0x7AQC5v9hIXmm/VYd/dFfLalVXrrdmOXCZyJ9ZU4JTcBtapicqjnbbcMFz 2CUn1Rv8mPQnCxWYPxIOVSXF4JWWv1Pc/6iHTCRSrKcbbaUNm2AKO5NSJekFc5Ct bdynMjtQfD0bazjqrf1YtSpE7pASJB9rk1ehBJSDgPB+2AoBUOB3uitXEW4fcpWn lPEtHBqF/WGxuBibWpb+4DMAK1LGSK/T2IS51AMq1z8ZOfn9Sfzz+cQNIf5SHVgk 1AmRLGpLr4CzcFDD1fuMqDO+nRMdEK25G8qBNc4aLQjiBctbT42nJV/yzfTxtbWQ pK8ROIyY2sBBRv6UlZwZWUVK7Tm0So6EtwClZ29nTLbBcmjsFynz4IzQypdv2rJW +1Q+GwEzZUbUFtTDg3kvSU8TXdyGDNM1LZLeCkmNcs4ZJUVbaD0x4HBK0VzPCVNs nocyYbn/OrBfFVrZ9zxMXB1r/bKyRFKD3aqpDSTcPYMNiaO8PvNkx2zOrsNdEHHM PaV26q0cp7ZTNcI1Zbgo =my// -----END PGP SIGNATURE----- --ogUXNSQj4OI1q3LQ--