home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / gnu / gdb / bug / 984 < prev    next >
Encoding:
Text File  |  1992-08-18  |  2.0 KB  |  67 lines

  1. Newsgroups: gnu.gdb.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!chorus.FR!ev
  3. From: ev@chorus.FR (Eric Valette)
  4. Subject: minor bug in gdb-4.5
  5. Message-ID: <9208180903.AA00268@larsen.chorus.fr>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Tue, 18 Aug 1992 13:03:27 GMT
  10. Approved: bug-gdb@prep.ai.mit.edu
  11. Lines: 54
  12.  
  13. I'm currently enhancing gdb-4.5 for multi-threading, cross debugging  
  14. using SUN's rpc (sparc->386).  While doing this I found a small 
  15. inconsistency inside the gdb sources :
  16.  
  17. in gdb-4.5/gdb/environ.c, in the function "set_in_environ", I think
  18. the SHELL variable sould also be exported : If the user wants
  19. to use another shell for starting his debugged program, he can't
  20. because child_create_inferior use getenv("SHELL") to get the 
  21. pathname of the shell for starting the program. I also used getenv
  22. for creating remote debugged programs BUT the shell on the host and 
  23. on the target where not located at the same place. I used the command
  24.  
  25. (gdb) set env SHELL = "/usr/local/bin/ksh"
  26.  
  27. before starting the remote program but getenv("SHELL) continued to 
  28. return : "/usr/bin/ksh" and thus the remote exec failed.
  29.  
  30.  
  31. void
  32. set_in_environ (e, var, value)
  33.      struct environ *e;
  34.      const char *var;
  35.      const char *value;
  36. {
  37.     ...
  38.  
  39.   /* Certain variables get exported back to the parent (e.g. our) 
  40.      environment, too.  */
  41.   if (!strcmp(var, "PATH")            /* Object file location */
  42.    || !strcmp (var, "G960BASE")         /* Intel 960 downloads */
  43.    || !strcmp (var, "G960BIN")             /* Intel 960 downloads */
  44.    || !strcmp (var, "GNUTARGET")        /* BFD object file type */
  45. +  || !strcmp (var, "SHELL")            /* my FIX */
  46.                 ) {
  47.     putenv (strsave (s));
  48.   }
  49.   ...
  50. }    
  51.  
  52. It is a minor bug but I think the correction is so simple...
  53.  
  54. Thanks for good free software,
  55.  
  56. Regards,
  57.  
  58.    __                 
  59.   /  `                       Eric Valette
  60.  /--   __  o _.              Chorus Systemes
  61. (___, / (_(_(__             6 avenue Gustave Eiffel
  62.                 F-78182, St-Quentin-en-Yvelines-Cedex
  63.  
  64. Tel: +33 (1) 30 64 82 00    Fax: +33 (1) 30 57 00 66
  65. E-mail: ev@chorus.fr
  66.  
  67.