This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/mingw32] environment variables are case-insensitive on win32


On Dec 10 17:26, Pierre Muller wrote:
> 
> 
> > -----Message d'origine-----
> > DeÂ: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> > owner@sourceware.org] De la part de 'Jerome Guitton'
> > EnvoyÃÂ: lundi 10 dÃcembre 2012 17:19
> > ÃÂ: Pierre Muller
> > CcÂ: gdb-patches@sourceware.org
> > ObjetÂ: Re: [RFA/mingw32] environment variables are case-insensitive on
> > win32
> > 
> > Pierre Muller (pierre.muller@ics-cnrs.unistra.fr):
> > 
> > > I am not sure, but I have the impression that the case_preserving
> > > environment of Windows OS is more a shell issue than an OS issue.
> > 
> > I don't think so, because I see the same problem by using "set env"
> > from GDB. But it does not matter much. I am now convinced that my
> > setup is to blame. So I'm happy to withdraw the Cygwin-specific part
> > of my patch.
> 
>   But my email was not about the cygwin part,
> it was really about the mingw executable:
>   Currently, you can set several separate environment variables
> having the same upeercase'd name, which
> can be passed correctly to the debuggee.

Just as a data point:

Only the Win32 function GetEnviromentVariable searches the environment
case-insensitive, and SetEnviromentVariable overwrites the first
occurence of a variable after a case-insensitive search.  These
functions are also used by CMD.EXE, so that it's case-insensitive as
well.

But that doesn't affect the ability to handle case-sensitive environments
in applications NOT using GetEnviromentVariable/SetEnviromentVariable.

If you give an environment to the CreateProcess function it will go
unchanged to the inferior process.  Fetching the complete environment
with GetEnvironmentStrings in the inferior will show the full,
unchanged, environment, with as much variables only differing by case as
you like.


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]