1 2005-04-02 Andrew Cagney <cagney@gnu.org>
3 * symfile.c (separate_debug_file_exists): When the CRCs mismatch
5 (find_separate_debug_file): Pass in the objfile's name.
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
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)
19 unsigned long file_crc = 0;
21 @@ -1316,7 +1317,15 @@ separate_debug_file_exists (const char *
25 - return crc == file_crc;
26 + if (crc != file_crc)
28 + warning (_("the debug information found in \"%s\""
29 + " does not match \"%s\" (CRC mismatch).\n"),
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);
42 + /* There's no separate debug info, hence there's no way we could
43 + load it => no warning. */
46 dir = xstrdup (objfile->name);
47 @@ -1395,7 +1406,7 @@ find_separate_debug_file (struct objfile
48 strcpy (debugfile, dir);
49 strcat (debugfile, basename);
51 - if (separate_debug_file_exists (debugfile, crc32))
52 + if (separate_debug_file_exists (debugfile, crc32, objfile->name))
56 @@ -1408,7 +1419,7 @@ find_separate_debug_file (struct objfile
57 strcat (debugfile, "/");
58 strcat (debugfile, basename);
60 - if (separate_debug_file_exists (debugfile, crc32))
61 + if (separate_debug_file_exists (debugfile, crc32, objfile->name))
65 @@ -1421,7 +1432,7 @@ find_separate_debug_file (struct objfile
66 strcat (debugfile, dir);
67 strcat (debugfile, basename);
69 - if (separate_debug_file_exists (debugfile, crc32))
70 + if (separate_debug_file_exists (debugfile, crc32, objfile->name))
74 @@ -1440,7 +1451,7 @@ find_separate_debug_file (struct objfile
75 strcat (debugfile, "/");
76 strcat (debugfile, basename);
78 - if (separate_debug_file_exists (debugfile, crc32))
79 + if (separate_debug_file_exists (debugfile, crc32, objfile->name))