summaryrefslogtreecommitdiffstats
path: root/source/d/binutils/patches/binutils-2.23.52.0.1-addr2line-dynsymtab.patch
blob: 944f4fdd3aa04b08556be3afe4f98074ca292728 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- a/bfd/opncls.c	2013-03-14 11:25:30.338306122 +0000
+++ b/bfd/opncls.c	2013-03-14 12:20:21.686397360 +0000
@@ -1297,6 +1297,8 @@
       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)
@@ -1332,6 +1334,26 @@
   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;