Blob Blame History Raw
*** ../binutils-2.23.52.0.1.orig/bfd/opncls.c	2013-03-14 11:25:30.338306122 +0000
--- bfd/opncls.c	2013-03-14 12:20:21.686397360 +0000
*************** find_separate_debug_file (bfd *abfd, con
*** 1297,1302 ****
--- 1297,1304 ----
        bfd_malloc (strlen (debug_file_directory) + 1
                    + (canon_dirlen > dirlen ? canon_dirlen : dirlen)
                    + strlen (".debug/")
+ #define FEDORA_LIB_DEBUG_DIR "/usr/lib/debug/"
+ 		  + strlen (FEDORA_LIB_DEBUG_DIR) + strlen ("usr/")
                    + strlen (base)
                    + 1);
    if (debugfile == NULL)
*************** find_separate_debug_file (bfd *abfd, con
*** 1332,1337 ****
--- 1334,1359 ----
    if (check_func (debugfile, crc32))
      goto found;
  
+   /* Then try in the global debug dir for Fedora libraries.  */
+   sprintf (debugfile, "%s%s%s", FEDORA_LIB_DEBUG_DIR, dir, base);
+   if (separate_debug_file_exists (debugfile, crc32))
+     {
+       free (base);
+       free (dir);
+       free (canon_dir);
+       return debugfile;
+     }
+ 
+   /* Then try in the usr subdirectory of the global debug dir for Fedora libraries.  */
+   sprintf (debugfile, "%s/usr%s%s", FEDORA_LIB_DEBUG_DIR, dir, base);
+   if (separate_debug_file_exists (debugfile, crc32))
+     {
+       free (base);
+       free (dir);
+       free (canon_dir);
+       return debugfile;
+     }
+   
    /* Then try in the global debugfile directory.  */
    strcpy (debugfile, debug_file_directory);
    dirlen = strlen (debug_file_directory) - 1;