Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Jerome Guitton'" <guitton@adacore.com>, <gdb-patches@sourceware.org>
Subject: RE: [RFA/mingw32] environment variables are case-insensitive on win32
Date: Mon, 10 Dec 2012 18:35:00 -0000	[thread overview]
Message-ID: <002101cdd705$0cde8390$269b8ab0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <20121210182156.GF17188@adacore.com>



> -----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 19:22
> À : gdb-patches@sourceware.org
> Objet : Re: [RFA/mingw32] environment variables are case-insensitive on
> win32
> 
> Corinna Vinschen (vinschen@redhat.com):
> 
> > 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.
> 
> Thank you very much for this clarification Corinna!
> 
> At this point I feel that the most sensible thing to do for mingw32 is
> to have case-insensitive env vars, even though on certain
> circonstances case-sensitivity would work. I have one other good
> reason to think that: the path command does not work today in mingw32
> when running the debugger from CMD.EXE. That is caused by the fact the
> corresponding environment variable has a different casing than PATH:
> it's 'Path' (at least on my machine). So a case-sensitive lookup
> fails, a new variable 'PATH' is created in the environment vector, and
> the inferior ends up with a truncated environment.

That is strange because when I start a mingw32 compiled GDB executable
from a console 
"show env" command does indeed display
Path variable,
but nonetheless GDB is perfectly able to use Path variable...

(gdb) show env
ALLUSERSPROFILE=C:\ProgramData
<<<<Lines removed
OS=Windows_NT
Path=C:\Program Files (x86)\MiKTeX 2.9\miktex\bin;C:\Program Files
(x86)\Windows
 Resource Kits\Tools\;C:\Program Files\Common Files\Microsoft Shared\Windows
Liv
e;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System3
2\Wi
ndowsPowerShell\v1.0\;C:\Program Files\Dell\DW WLAN Card;c:\Program
Files\WIDCOM
M\Bluetooth Software\;c:\Program Files\WIDCOMM\Bluetooth
Software\syswow64;C:\Pr
ogram Files (x86)\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program
Fil
es\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\Wave
Systems
 Corp\Gemalto\Access Client\v5\;C:\Program Files (x86)\Common Files\Roxio
Shared
\DLLShared\;C:\Program Files (x86)\Common Files\Roxio
Shared\10.0\DLLShared\;E:\
pas\svnbin;C:\Program Files\Intel\DMIX;C:\Program Files (x86)\MySQL\MySQL
Server
 5.5\bin;e:\pas\fpc-2.6.0\bin\i386-Win32;C:\Program
Files\SlikSvn\bin;C:\Program
 Files (x86)\Dr. Memory\bin;C:\Program Files (x86)\PuTTY;C:\Program Files
(x86)\
OpenVPN\bin;C:\Program Files
(x86)\OVPSim\Imperas\bin\Windows32;C:\OVPSim\Impera
s\bin\Windows32
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
<<<<Lines removed
COLUMNS=80
(gdb) file drmemory.exe
Load new symbol table from "C:\Program Files (x86)\Dr.
Memory\bin\drmemory.exe"?
 (y or n) y
Reading symbols from C:\Program Files (x86)\Dr.
Memory\bin\drmemory.exe...(no de
bugging symbols found)...done.

I don't know why this doesn't work for you.

Pierre


  reply	other threads:[~2012-12-10 18:35 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30 13:37 Jerome Guitton
2012-11-30 13:47 ` Eli Zaretskii
2012-11-30 14:08   ` Jerome Guitton
2012-11-30 15:27     ` Eli Zaretskii
2012-11-30 15:34       ` Jerome Guitton
2012-11-30 16:07         ` Eli Zaretskii
2012-11-30 16:29           ` Jerome Guitton
2012-11-30 18:55             ` Eli Zaretskii
2012-12-07  9:22               ` Jerome Guitton
2012-12-07  9:30                 ` Eli Zaretskii
2012-12-07 10:06                   ` Jerome Guitton
2012-12-07 10:06                 ` Joel Brobecker
2012-12-07 10:11                   ` Jerome Guitton
2012-12-07 10:18                     ` Joel Brobecker
2012-11-30 19:02             ` Pedro Alves
2012-12-03 11:31               ` Jerome Guitton
2012-12-09 23:53                 ` Christopher Faylor
2012-12-10 10:51                   ` Jerome Guitton
2012-12-10 11:01                     ` Corinna Vinschen
2012-12-10 13:50                       ` Joel Brobecker
2012-12-10 15:24                         ` Corinna Vinschen
2012-12-10 15:42                           ` Jerome Guitton
2012-12-10 15:58                             ` Corinna Vinschen
2012-12-10 16:08                               ` Jerome Guitton
2012-12-10 16:09                               ` Eli Zaretskii
2012-12-10 16:17                                 ` Corinna Vinschen
2012-12-10 16:24                                   ` Jerome Guitton
2012-12-10 16:24                                   ` Eli Zaretskii
2012-12-10 16:57                                     ` Corinna Vinschen
2012-12-10 20:11                                       ` Eli Zaretskii
2012-12-11 10:20                                         ` Corinna Vinschen
2012-12-11 14:25                               ` Pedro Alves
2012-12-11 14:41                                 ` Corinna Vinschen
2012-12-11 15:07                                   ` Pedro Alves
2012-12-11 15:21                                     ` Corinna Vinschen
2012-12-11 15:23                                     ` Pierre Muller
2012-12-14 10:55                                       ` Jerome Guitton
2012-12-14 10:35                                 ` Jerome Guitton
2012-12-10 15:35                         ` Jerome Guitton
2012-12-10 16:09                           ` Pierre Muller
2012-12-10 16:18                             ` 'Jerome Guitton'
2012-12-10 16:27                               ` Pierre Muller
2012-12-10 16:54                                 ` Corinna Vinschen
2012-12-10 18:22                                   ` Jerome Guitton
2012-12-10 18:35                                     ` Pierre Muller [this message]
2012-12-10 18:36                                       ` 'Jerome Guitton'
2012-12-11  9:50                                         ` 'Jerome Guitton'
2012-12-11 16:27                               ` Christopher Faylor
     [not found]                           ` <002401cdd6f0$c0b317b0$42194710$%muller@ics-cnrs.unistra.fr>
2012-12-10 16:26                             ` Eli Zaretskii
2012-12-10 16:40                               ` Pierre Muller
2012-12-10 16:51                                 ` Jerome Guitton
2012-12-10 17:16                                 ` Jerome Guitton
2012-11-30 14:43 ` Pedro Alves
2012-11-30 15:03   ` Jerome Guitton
2012-11-30 15:38     ` Jerome Guitton
2012-11-30 15:41       ` Pedro Alves
2012-11-30 15:46         ` Tom Tromey
2012-11-30 15:49           ` Pedro Alves
2012-11-30 16:02         ` Jerome Guitton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002101cdd705$0cde8390$269b8ab0$@muller@ics-cnrs.unistra.fr' \
    --to=pierre.muller@ics-cnrs.unistra.fr \
    --cc=gdb-patches@sourceware.org \
    --cc=guitton@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox