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


> > (gdb) set prompt top>
> > top> r
> > Starting program: e:\pas\fpc-2.6.0\bin\i386-Win32\gdbpurepython.exe
> > ... Some output suppressed
> >  (gdb) [New Thread 5920.0xb04]
> > [New Thread 5920.0x1588]
> > show env
> > ALLUSERSPROFILE=C:\ProgramData
> > ... More output suppressed
> > PROMPT=$P$G
> > PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
> > PUBLIC=C:\Users\Public
> > RoxioCentral=C:\Program Files (x86)\Common Files\Roxio Shared\10.0\Roxio
> > Central36\
> > SESSIONNAME=Console
> > SystemDrive=C:
> > SystemRoot=C:\Windows
> > TEMP=C:\Users\Pierre\AppData\Local\Temp
> > test1=lower
> > Test1=Mixed
> > TEST1=UPPER
> > ... More output suppressed
> 
> You _are_ aware that "show env" is a GDB command, right?  What you
> need to do is run some Windows program after pushing these variables
> into the environment, and then see what that problem gets as
> environment.

  Hi Eli,

  I am totally aware of this,
but please note that I run this command in the debuggee
(prompt is (gdb), not top>)
(I should have remoced the [New Thread] information message that probably
confused you)
and GDB itself is a Windows program like any other one,
and the environment is passed from top to debuggee
through the env field of CreateProcess call in windows_create_process


Furthermore compiling testenv.c
$ cat testenv.c
#include "stdio.h"

int
main (int argc, char **argv, char **env)
{
  int envindex = 1;
  char *curr_env = *env;

  while (curr_env)
    {
      printf("env#%d is %s\n",envindex,curr_env);
      curr_env = env [envindex];
      envindex++;
    }
  return 0;
}

also shows the three different versions of test1
Short extract of running testenv inside mingw GDB
after having set the same env variables
env#52 is TEMP=C:/Users/Pierre/AppData/Local/Temp
env#53 is TERM=cygwin
env#54 is test1=lower
env#55 is Test1=Mixed
env#56 is TEST1=UPPER
env#57 is TMP=C:/Users/Pierre/AppData/Local/Temp
env#58 is USERDOMAIN=E6510-Muller

Pierre


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