Article View: gnu.gdb.bug
Article #2673cygwin gdb does not pass along exported enviornment variables
From: Gill Bates
Date: Sun, 03 Mar 2002 04:11
Date: Sun, 03 Mar 2002 04:11
62 lines
2598 bytes
2598 bytes
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!!!
Technical Details
Message-ID:
<8e6815bd.0203022011.26d019cd@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!torn!news-out.cwix.com!newsfeed.cwix.com!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5053,8844d16fd3a7e8ad,start X-Google-Attributes: gidf5053,public X-Google-ArrivalTime: 2002-03-02 20:11:57 PST x-uunet-gateway: chi6sosrv11.alter.net from bug-gdb to gnu.gdb.bug; Sun, 3 Mar 2002 04:11:35 GMT Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!torn!news-out.cwix.com!newsfeed.cwix.com!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!not-for-mail From: gill_bates@hotmail.com (Gill Bates) Subject: cygwin gdb does not pass along exported enviornment variables Date: 2 Mar 2002 20:11:45 -0800 Organization: http://groups.google.com/ Message-ID: <8e6815bd.0203022011.26d019cd@posting.google.com> NNTP-Posting-Host: 24.94.114.18 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1015128706 29477 127.0.0.1 (3 Mar 2002 04:11:46 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 3 Mar 2002 04:11:46 GMT Approved: bug-gdb-request@mail.gnu.org Newsgroups: gnu.gdb.bug Sender: bug-gdb-request@mail.gnu.org Lines: 62