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

'Jerome Guitton' guitton@adacore.com
Tue Dec 11 09:50:00 GMT 2012


'Jerome Guitton' (guitton@adacore.com):

> Right, but try
> 
> (gdb) path C:\
> 
> ...and you'll see what I mean.

...or, to better illustrate my point, consider the following scenario:

gdb /cygwin/bin/which.exe 
(gdb) r ls 
Starting program: C:\cygwin\bin\which.exe ls 
/usr/bin/which: no ls in ([...]) 
(gdb) path C:/cygwin/bin 
Executable and object file path: C:/cygwin/bin 
(gdb) r ls 
Starting program: C:\cygwin\bin\which.exe ls 
/usr/bin/which: no ls in ([...]) 
 
This is cause by the fact that C:/cygwin/bin has not been added to
'Path'... but to 'PATH'. 'show env PATH' and 'show env Path' give
two different results.

Now, the problem does not occur with case-insentivity:
 
gdb /cygwin/bin/which.exe 
(gdb) r ls 
Starting program: C:\cygwin\bin\which.exe ls 
/usr/bin/which: no ls in ([...]) 
(gdb) path C:/cygwin/bin 
Executable and object file path: C:/cygwin/bin;[...rest of original PATH] 
(gdb) r ls                                  
/usr/bin/ls 
 
Now an alternative solution could be to use 'Path' instead of 'PATH'
in the case of mingw32. That would fix this problem. I tend to think
that having the same behavior as CMD.EXE for mingw32 is the most
reasonable thing to do, though. So case-insentivity.



More information about the Gdb-patches mailing list