]> git.pld-linux.org Git - packages/gdb.git/blob - gdb-6.3-sepcrc-20050402.patch
- obsolete file
[packages/gdb.git] / gdb-6.3-sepcrc-20050402.patch
1 2005-04-02  Andrew Cagney  <cagney@gnu.org>
2
3         * symfile.c (separate_debug_file_exists): When the CRCs mismatch
4         print a warning.
5         (find_separate_debug_file): Pass in the objfile's name.
6
7 Index: gdb-6.8.50.20081128/gdb/symfile.c
8 ===================================================================
9 --- gdb-6.8.50.20081128.orig/gdb/symfile.c      2008-10-03 18:36:10.000000000 +0200
10 +++ gdb-6.8.50.20081128/gdb/symfile.c   2008-12-01 16:34:36.000000000 +0100
11 @@ -1296,7 +1296,8 @@ get_debug_link_info (struct objfile *obj
12  }
13  
14  static int
15 -separate_debug_file_exists (const char *name, unsigned long crc)
16 +separate_debug_file_exists (const char *name, unsigned long crc,
17 +                           const char *parent_name)
18  {
19    unsigned long file_crc = 0;
20    bfd *abfd;
21 @@ -1316,7 +1317,15 @@ separate_debug_file_exists (const char *
22  
23    bfd_close (abfd);
24  
25 -  return crc == file_crc;
26 +  if (crc != file_crc)
27 +    {
28 +      warning (_("the debug information found in \"%s\""
29 +                " does not match \"%s\" (CRC mismatch).\n"),
30 +              name, parent_name);
31 +      return 0;
32 +    }
33 +
34 +  return 1;
35  }
36  
37  char *debug_file_directory = NULL;
38 @@ -1368,6 +1377,8 @@ find_separate_debug_file (struct objfile
39    basename = get_debug_link_info (objfile, &crc32);
40  
41    if (basename == NULL)
42 +    /* There's no separate debug info, hence there's no way we could
43 +       load it => no warning.  */
44      return NULL;
45  
46    dir = xstrdup (objfile->name);
47 @@ -1395,7 +1406,7 @@ find_separate_debug_file (struct objfile
48    strcpy (debugfile, dir);
49    strcat (debugfile, basename);
50  
51 -  if (separate_debug_file_exists (debugfile, crc32))
52 +  if (separate_debug_file_exists (debugfile, crc32, objfile->name))
53      {
54        xfree (basename);
55        xfree (dir);
56 @@ -1408,7 +1419,7 @@ find_separate_debug_file (struct objfile
57    strcat (debugfile, "/");
58    strcat (debugfile, basename);
59  
60 -  if (separate_debug_file_exists (debugfile, crc32))
61 +  if (separate_debug_file_exists (debugfile, crc32, objfile->name))
62      {
63        xfree (basename);
64        xfree (dir);
65 @@ -1421,7 +1432,7 @@ find_separate_debug_file (struct objfile
66    strcat (debugfile, dir);
67    strcat (debugfile, basename);
68  
69 -  if (separate_debug_file_exists (debugfile, crc32))
70 +  if (separate_debug_file_exists (debugfile, crc32, objfile->name))
71      {
72        xfree (basename);
73        xfree (dir);
74 @@ -1440,7 +1451,7 @@ find_separate_debug_file (struct objfile
75        strcat (debugfile, "/");
76        strcat (debugfile, basename);
77  
78 -      if (separate_debug_file_exists (debugfile, crc32))
79 +      if (separate_debug_file_exists (debugfile, crc32, objfile->name))
80         {
81           xfree (canon_name);
82           xfree (basename);
This page took 0.02737 seconds and 3 git commands to generate.