bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cygwin gdb does not pass along exported enviornment variables


From: Gill Bates
Subject: cygwin gdb does not pass along exported enviornment variables
Date: 2 Mar 2002 20:11:45 -0800

I am suprised to discover:

WEASEL:> export Var1=1
WEASEL:> x
Var1=[1]
WEASEL:> gdb -nw x
GNU gdb 5.0 (20010428-3)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) run
Starting program: /home/harold/win32_1-0/mainsail/build/bin/x.exe
ntdll.dll: No such file or directory.
Var1=[NULL]

Program exited normally.
(gdb) quit
WEASEL:>

cat x.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>



int
main (int argc, char *argv[])
{
        char    *env;

        env = getenv ("Var1");
        printf ("Var1=[%s]\n", env==NULL?"NULL":env);
        return 0;
}

gcc -g x.c -o x
gcc -dumpversion
2.95.3-5

Maybe the problem is due to:
  ntdll.dll: No such file or directory.
But, dunno what that means either...

Also:
bash --version
GNU bash, version 2.05a.0(2)-release (i686-pc-cygwin)
Copyright 2001 Free Software Foundation, Inc.


Anybody know what's going on? is this normal behavior for cygwin-gdb.
It certainly does not work that way under Unix... Is there a gdb
command option to say "please pass along exported variables" ?

Thanks for any help!!!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]