diff options
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r-- | gdb/symfile.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c index 06b5dec..1478c83 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1325,7 +1325,7 @@ separate_debug_file_exists (const char *name, unsigned long crc, ".debug" suffix as "/usr/lib/debug/path/to/file" is a separate tree where the separate debug infos with the same basename can exist. */ - if (strcmp (name, parent_objfile->name) == 0) + if (filename_cmp (name, parent_objfile->name) == 0) return 0; abfd = bfd_open_maybe_remote (name); @@ -1333,7 +1333,7 @@ separate_debug_file_exists (const char *name, unsigned long crc, if (!abfd) return 0; - /* Verify symlinks were not the cause of strcmp name difference above. + /* Verify symlinks were not the cause of filename_cmp name difference above. Some operating systems, e.g. Windows, do not provide a meaningful st_ino; they always set it to zero. (Windows does provide a @@ -1471,7 +1471,8 @@ find_separate_debug_file_by_debuglink (struct objfile *objfile) /* If the file is in the sysroot, try using its base path in the global debugfile directory. */ if (canon_name - && strncmp (canon_name, gdb_sysroot, strlen (gdb_sysroot)) == 0 + && filename_ncmp (canon_name, gdb_sysroot, + strlen (gdb_sysroot)) == 0 && IS_DIR_SEPARATOR (canon_name[strlen (gdb_sysroot)])) { memcpy (debugfile, debugdir, debugdir_end - debugdir); @@ -2375,8 +2376,9 @@ reread_symbols (void) /* We need to do this whenever any symbols go away. */ make_cleanup (clear_symtab_users_cleanup, 0 /*ignore*/); - if (exec_bfd != NULL && strcmp (bfd_get_filename (objfile->obfd), - bfd_get_filename (exec_bfd)) == 0) + if (exec_bfd != NULL + && filename_cmp (bfd_get_filename (objfile->obfd), + bfd_get_filename (exec_bfd)) == 0) { /* Reload EXEC_BFD without asking anything. */ |