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 16:42, Jerome Guitton wrote:
> Corinna Vinschen (vinschen@redhat.com):
> 
> > Cygwin is not Windows.  Cygwin is a UNIX-like system like Linux,
> > Solaris, OpenBSD, etc.  The question you should ask is this:  Would
> > you like to match environment variable names case-insensitive on Linux,
> > Solaris, OpenBSD?  If the answer is "no", the answer for Cygwin is "no",
> > too.
> 
> Something may be broken in Cygwin's GDB, or maybe my version of Cygwin
> is too old, because environment variables that have the same names are
> identified in the inferior:
> 
> guitton@kerel ~
> $ export TEST_GDB_V=1                                                           
> guitton@kerel ~
> $ export TEST_GDB_v=2
> 
> guitton@kerel ~
> $ env | grep TEST_GDB
> TEST_GDB_V=1
> TEST_GDB_v=2
> 
> guitton@kerel ~
> $ /bin/gdb ./gdb/testsuite/gdb.base/testenv.exe 
> [...]
> (gdb) r
> Starting program: /home/guitton/GIT/GDB/builds/obj.gdb-fsf.cygwin/gdb/testsuite/gdb.base/testenv.exe 
> [New thread 12692.0x16ac]
> [New thread 12692.0x22b0]
> TEST_GDB_V=2
> Program found 1 variables starting with TEST_GDB

Probably an old Cygwin version.  Older versions of Cygwin did not
honor the case of env vars, but rather converted them all to uppercase,
but this is pre-2008!

I don't have GDB test environment set up, but this works for me with the
most recent Cygwin version 1.7.18:

  tcsh$ setenv TEST_GDB_V 1
  tcsh$ setenv TEST_GDB_v 2
  tcsh$ gdb /bin/env
  GNU gdb (GDB) 7.5.50.20120815-cvs (cygwin-special)
  Copyright (C) 2012 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "i686-cygwin".
  For bug reporting instructions, please see:
  <http://www.gnu.org/software/gdb/bugs/>...
  Reading symbols from /bin/env...(no debugging symbols found)...done.
  (gdb) r
  Starting program: /bin/env
  [New Thread 1552.0xe24]
  [New Thread 1552.0x9c8]
  ALLUSERSPROFILE=C:\ProgramData
  [...]
  TEST_GDB_V=1
  TEST_GDB_v=2
  [...]
  [Inferior 1 (process 1552) exited normally]
  (gdb)


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]