gdb/
[deliverable/binutils-gdb.git] / gdb / solib.c
index 6748d8768c92ecc3f7971e9fb596a04e7ca7de61..a9f46e00099a931aceb4923373d25e5c11be23bd 100644 (file)
@@ -638,7 +638,7 @@ solib_read_symbols (struct so_list *so, int flags)
          /* Have we already loaded this shared object?  */
          ALL_OBJFILES (so->objfile)
            {
-             if (strcmp (so->objfile->name, so->so_name) == 0
+             if (filename_cmp (so->objfile->name, so->so_name) == 0
                  && so->objfile->addr_low == so->addr_low)
                break;
            }
@@ -648,7 +648,8 @@ solib_read_symbols (struct so_list *so, int flags)
          sap = build_section_addr_info_from_section_table (so->sections,
                                                            so->sections_end);
          so->objfile = symbol_file_add_from_bfd (so->abfd,
-                                                 flags, sap, OBJF_SHARED);
+                                                 flags, sap, OBJF_SHARED,
+                                                 NULL);
          so->objfile->addr_low = so->addr_low;
          free_section_addr_info (sap);
        }
@@ -762,7 +763,7 @@ update_solib_list (int from_tty, struct target_ops *target)
            }
          else
            {
-             if (! strcmp (gdb->so_original_name, i->so_original_name))
+             if (! filename_cmp (gdb->so_original_name, i->so_original_name))
                break;        
            }
 
@@ -1326,6 +1327,7 @@ reload_shared_libraries_1 (int from_tty)
        SYMFILE_DEFER_BP_RESET | (from_tty ? SYMFILE_VERBOSE : 0);
 
       filename = tilde_expand (so->so_original_name);
+      make_cleanup (xfree, filename);
       abfd = solib_bfd_open (filename);
       if (abfd != NULL)
        {
@@ -1338,7 +1340,7 @@ reload_shared_libraries_1 (int from_tty)
         symbol file, close that.  */
       if ((found_pathname == NULL && was_loaded)
          || (found_pathname != NULL
-             && strcmp (found_pathname, so->so_name) != 0))
+             && filename_cmp (found_pathname, so->so_name) != 0))
        {
          if (so->objfile && ! (so->objfile->flags & OBJF_USERLOADED))
            free_objfile (so->objfile);
@@ -1350,7 +1352,7 @@ reload_shared_libraries_1 (int from_tty)
         file, open it.  */
       if (found_pathname != NULL
          && (!was_loaded
-             || strcmp (found_pathname, so->so_name) != 0))
+             || filename_cmp (found_pathname, so->so_name) != 0))
        {
          volatile struct gdb_exception e;
 
This page took 0.026436 seconds and 4 git commands to generate.