This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Fix thinko in solib_open



Got a little carried away with cut'n'paste...   ;-(

2000-11-01  Michael Snyder  <msnyder@cleaver.cygnus.com>

        * solib.c (solib_open): Fix think-o (cut'n'paste mistake).

Index: solib.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/solib.c,v
retrieving revision 1.157
retrieving revision 1.158
diff -c -3 -p -r1.157 -r1.158
*** solib.c	2000/10/31 22:17:16	1.157
--- solib.c	2000/11/02 01:53:47	1.158
*************** solib_open (char *in_pathname, char **fo
*** 125,143 ****
  			1, in_pathname, O_RDONLY, 0, &temp_pathname);
  
    /* If not found, next search the inferior's $PATH environment variable. */
!   if (found_file < 0 && solib_search_path != NULL)
      found_file = openp (get_in_environ (inferior_environ, "PATH"),
  			1, in_pathname, O_RDONLY, 0, &temp_pathname);
  
    /* If not found, next search the inferior's $LD_LIBRARY_PATH 
       environment variable. */
!   if (found_file < 0 && solib_search_path != NULL)
      found_file = openp (get_in_environ (inferior_environ, "LD_LIBRARY_PATH"),
  			1, in_pathname, O_RDONLY, 0, &temp_pathname);
  
    /* Done.  If not found, tough luck.  Return found_file and 
       (optionally) found_pathname.  */
!   if (found_pathname != NULL)
      *found_pathname = strsave (temp_pathname);
    return found_file;
  }
--- 125,143 ----
  			1, in_pathname, O_RDONLY, 0, &temp_pathname);
  
    /* If not found, next search the inferior's $PATH environment variable. */
!   if (found_file < 0)
      found_file = openp (get_in_environ (inferior_environ, "PATH"),
  			1, in_pathname, O_RDONLY, 0, &temp_pathname);
  
    /* If not found, next search the inferior's $LD_LIBRARY_PATH 
       environment variable. */
!   if (found_file < 0)
      found_file = openp (get_in_environ (inferior_environ, "LD_LIBRARY_PATH"),
  			1, in_pathname, O_RDONLY, 0, &temp_pathname);
  
    /* Done.  If not found, tough luck.  Return found_file and 
       (optionally) found_pathname.  */
!   if (found_pathname != NULL && found_file >= 0)
      *found_pathname = strsave (temp_pathname);
    return found_file;
  }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]