home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / gnu / gdb / bug / 1025 < prev    next >
Encoding:
Text File  |  1992-09-04  |  1.5 KB  |  47 lines

  1. 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
  2. From: willoch@geos01.sinet.slb.com (thorbjorn willoch)
  3. Newsgroups: gnu.gdb.bug
  4. Subject: Strange behaviour regarding  environment variables.
  5. Message-ID: <WILLOCH.92Sep4142749@geos114.geos01.sinet.slb.com>
  6. Date: 4 Sep 92 02:27:39 GMT
  7. Sender: gnulists@ai.mit.edu
  8. Distribution: gnu
  9. Organization: GECO-PRACLA Europa and Arica Marine Region
  10. Lines: 34
  11. Approved: bug-gdb@prep.ai.mit.edu
  12.  
  13. geos112:recording.stage>cat t.c
  14. main(int argc,char **argv)
  15. {
  16.  printf("%s\n",getenv(argv[1]));
  17. }
  18.  
  19.  
  20. geos112:recording.stage>a.out TRILOGY
  21. /homedirs/triacq/BASELINE
  22.  
  23.  
  24. geos112:recording.stage>gdb a.out
  25. GDB is free software and you are welcome to distribute copies of it
  26.  under certain conditions; type "show copying" to see the conditions.
  27. There is absolutely no warranty for GDB; type "show warranty" for details.
  28. GDB 4.5, Copyright 1992 Free Software Foundation, Inc...
  29. (gdb) r TRILOGY
  30. Starting program: /tmp_mnt/homedirs/triacq/recording.stage/a.out TRILOGY
  31. /homedirs/triacq/bsl
  32.  
  33. Program exited with code 02.
  34. (gdb) show env TRILOGY
  35. TRILOGY = /homedirs/triacq/BASELINE
  36. (gdb) geos112:recording.stage>
  37.  
  38. When running the program above gdb, a previous value of TRILOGY is used. 
  39. Gdb itself sees the right environment, but the program it runs sees something 
  40. different.
  41.  
  42. I can do the example again and again while in the shell., but I am not able to redo it 
  43. if I start a new session.
  44.  
  45.  
  46. Thorbjorn
  47.