Blame SOURCES/binutils-2.23.52.0.1-find-separate-debug-file.patch
|
|
4910d4 |
--- a/bfd/opncls.c 2013-03-14 11:25:30.338306122 +0000
|
|
|
4910d4 |
+++ b/bfd/opncls.c 2013-03-14 12:20:21.686397360 +0000
|
|
|
4910d4 |
@@ -1297,6 +1297,8 @@
|
|
|
4910d4 |
bfd_malloc (strlen (debug_file_directory) + 1
|
|
|
4910d4 |
+ (canon_dirlen > dirlen ? canon_dirlen : dirlen)
|
|
|
4910d4 |
+ strlen (".debug/")
|
|
|
4910d4 |
+#define FEDORA_LIB_DEBUG_DIR "/usr/lib/debug/"
|
|
|
4910d4 |
+ + strlen (FEDORA_LIB_DEBUG_DIR) + strlen ("usr/")
|
|
|
4910d4 |
+ strlen (base)
|
|
|
4910d4 |
+ 1);
|
|
|
4910d4 |
if (debugfile == NULL)
|
|
|
4910d4 |
@@ -1332,6 +1334,26 @@
|
|
|
4910d4 |
if (check_func (debugfile, crc32))
|
|
|
4910d4 |
goto found;
|
|
|
4910d4 |
|
|
|
4910d4 |
+ /* Then try in the global debug dir for Fedora libraries. */
|
|
|
4910d4 |
+ sprintf (debugfile, "%s%s%s", FEDORA_LIB_DEBUG_DIR, dir, base);
|
|
|
4910d4 |
+ if (separate_debug_file_exists (debugfile, crc32))
|
|
|
4910d4 |
+ {
|
|
|
4910d4 |
+ free (base);
|
|
|
4910d4 |
+ free (dir);
|
|
|
4910d4 |
+ free (canon_dir);
|
|
|
4910d4 |
+ return debugfile;
|
|
|
4910d4 |
+ }
|
|
|
4910d4 |
+
|
|
|
4910d4 |
+ /* Then try in the usr subdirectory of the global debug dir for Fedora libraries. */
|
|
|
4910d4 |
+ sprintf (debugfile, "%s/usr%s%s", FEDORA_LIB_DEBUG_DIR, dir, base);
|
|
|
4910d4 |
+ if (separate_debug_file_exists (debugfile, crc32))
|
|
|
4910d4 |
+ {
|
|
|
4910d4 |
+ free (base);
|
|
|
4910d4 |
+ free (dir);
|
|
|
4910d4 |
+ free (canon_dir);
|
|
|
4910d4 |
+ return debugfile;
|
|
|
4910d4 |
+ }
|
|
|
4910d4 |
+
|
|
|
4910d4 |
/* Then try in the global debugfile directory. */
|
|
|
4910d4 |
strcpy (debugfile, debug_file_directory);
|
|
|
4910d4 |
dirlen = strlen (debug_file_directory) - 1;
|