From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9208 invoked by alias); 11 Dec 2012 15:23:39 -0000 Received: (qmail 9199 invoked by uid 22791); 11 Dec 2012 15:23:37 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.153) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Dec 2012 15:23:29 +0000 Received: from md16.u-strasbg.fr (md16.u-strasbg.fr [130.79.200.206]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qBBFNM2b049336 ; Tue, 11 Dec 2012 16:23:23 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms11.u-strasbg.fr [130.79.204.111]) by md16.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qBBFNMIj021187 ; Tue, 11 Dec 2012 16:23:22 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qBBFNLJu028324 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Tue, 11 Dec 2012 16:23:22 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Pedro Alves'" , References: <50B902D0.6060809@redhat.com> <20121203113147.GB12055@adacore.com> <20121209235344.GA12152@ednor.casa.cgf.cx> <20121210105115.GB15147@adacore.com> <20121210110128.GA12570@calimero.vinschen.de> <20121210134935.GL31477@adacore.com> <20121210152408.GB11967@calimero.vinschen.de> <20121210154231.GC17188@adacore.com> <20121210155752.GA16027@calimero.vinschen.de> <50C74268.7090209@redhat.com> <20121211144043.GA19874@calimero.vinschen.de> <50C74C0F.7040607@redhat.com> In-Reply-To: <50C74C0F.7040607@redhat.com> Subject: RE: [RFA/mingw32] environment variables are case-insensitive on win32 Date: Tue, 11 Dec 2012 15:23:00 -0000 Message-ID: <000301cdd7b3$76052960$620f7c20$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: 2012-12/txt/msg00337.txt.bz2 > > However, when a Cygwin process gets started by a *non*-Cygwin process, > > this internal mechanism can't work, and the POSIX environment is created > > from the Windows environment. Up until 2008, all environment variables > > in the Windows env were converted to uppercase when creating the POSIX > > env. In 2008 we changed that mechanism to uppercase only a certain set > > of env vars, and that's done up to today for compatibility reasons. The > > list of still uppercased vars is this: > > > > ALLUSERSPROFILE > > COMMONPROGRAMFILES > > COMPUTERNAME > > COMSPEC > > HOME > > HOMEDRIVE > > HOMEPATH > > NUMBER_OF_PROCESSORS > > OS > > PATH This explains why Cygwin doesn't show the same problem as mingw does. You never end up have Path variable... > > PATHEXT > > PROCESSOR_ARCHITECTURE > > PROCESSOR_IDENTIFIER > > PROCESSOR_LEVEL > > PROCESSOR_REVISION > > PROGRAMFILES > > SYSTEMDRIVE > > SYSTEMROOT > > TEMP > > TERM > > TMP > > TMPDIR > > WINDIR >=20 > Then, the situation of GDB (a Cygwin process) starting the inferior with > CreateProcess ends up being the same as if GDB was not a Cygwin process, = and > that set of vars always ends up uppercased in the inferior, right? Or do= es > Cygwin have some magic that detects the case, and avoids the uppercasing = in > this case? Coming back to the mingw32 case, currently you can perfectly pass both Path and PATH environment variables t= o debuggee. If this debuggee is cmd.exe, the funny thing is that it will use the value of Path rather than that of PATH .... Let me show to you: (gdb) file cmd.exe (output suppressed) (gdb) set env PATH=3De:\pas\svnbin (gdb) set env Path=3Dc:\windows\system32 (gdb) run e:\ set lists both Path and PATH ...lines suppressed OS=3DWindows_NT Path=3Dc:\windows\system32 PATH=3De:\pas\svnbin PATHEXT=3D.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC ...lines suppressed but svn.exe (present in e:\pas\svnbin)=20 is not found... %PATH%\svn.exe also doesn't work, because cmd.exe expands %PATH% to the value of Path variable... Isn't this all strange... Pierre