home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!ames!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!geos01.sinet.slb.com!willoch
- From: willoch@geos01.sinet.slb.com (thorbjorn willoch)
- Newsgroups: gnu.gdb.bug
- Subject: Strange behaviour regarding environment variables.
- Message-ID: <WILLOCH.92Sep4142749@geos114.geos01.sinet.slb.com>
- Date: 4 Sep 92 02:27:39 GMT
- Sender: gnulists@ai.mit.edu
- Distribution: gnu
- Organization: GECO-PRACLA Europa and Arica Marine Region
- Lines: 34
- Approved: bug-gdb@prep.ai.mit.edu
-
- geos112:recording.stage>cat t.c
- main(int argc,char **argv)
- {
- printf("%s\n",getenv(argv[1]));
- }
-
-
- geos112:recording.stage>a.out TRILOGY
- /homedirs/triacq/BASELINE
-
-
- geos112:recording.stage>gdb a.out
- GDB is free software and you are welcome to 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.
- GDB 4.5, Copyright 1992 Free Software Foundation, Inc...
- (gdb) r TRILOGY
- Starting program: /tmp_mnt/homedirs/triacq/recording.stage/a.out TRILOGY
- /homedirs/triacq/bsl
-
- Program exited with code 02.
- (gdb) show env TRILOGY
- TRILOGY = /homedirs/triacq/BASELINE
- (gdb) geos112:recording.stage>
-
- When running the program above gdb, a previous value of TRILOGY is used.
- Gdb itself sees the right environment, but the program it runs sees something
- different.
-
- I can do the example again and again while in the shell., but I am not able to redo it
- if I start a new session.
-
-
- Thorbjorn
-