gdb/testsuite/
[binutils-gdb.git] / gdb / symtab.c
index 3105327bba7063ef719e2e51ca177e26f791a188..8aa692d6c3bd7fca73ba6c50c6b4900cbe0c2942 100644 (file)
@@ -2761,7 +2761,7 @@ filename_seen (const char *file, int add, int *first)
 
   /* Is FILE in tab?  */
   for (p = tab; p < tab + tab_cur_size; p++)
-    if (strcmp (*p, file) == 0)
+    if (filename_cmp (*p, file) == 0)
       return 1;
 
   /* No; maybe add it to tab.  */
@@ -2862,7 +2862,7 @@ file_matches (const char *file, char *files[], int nfiles)
     {
       for (i = 0; i < nfiles; i++)
        {
-         if (strcmp (files[i], lbasename (file)) == 0)
+         if (filename_cmp (files[i], lbasename (file)) == 0)
            return 1;
        }
     }
@@ -3006,7 +3006,7 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[],
   static const enum minimal_symbol_type types3[]
     = {mst_file_data, mst_solib_trampoline, mst_abs, mst_unknown};
   static const enum minimal_symbol_type types4[]
-    = {mst_file_bss, mst_text, mst_abs, mst_unknown};
+    = {mst_file_bss, mst_text_gnu_ifunc, mst_abs, mst_unknown};
   enum minimal_symbol_type ourtype;
   enum minimal_symbol_type ourtype2;
   enum minimal_symbol_type ourtype3;
@@ -3260,7 +3260,7 @@ static void
 print_symbol_info (domain_enum kind, struct symtab *s, struct symbol *sym,
                   int block, char *last)
 {
-  if (last == NULL || strcmp (last, s->filename) != 0)
+  if (last == NULL || filename_cmp (last, s->filename) != 0)
     {
       fputs_filtered ("\nFile ", gdb_stdout);
       fputs_filtered (s->filename, gdb_stdout);
@@ -3403,7 +3403,7 @@ rbreak_command (char *regexp, int from_tty)
   struct cleanup *old_chain;
   char *string = NULL;
   int len = 0;
-  char **files = NULL;
+  char **files = NULL, *file_name;
   int nfiles = 0;
 
   if (regexp)
@@ -3413,7 +3413,6 @@ rbreak_command (char *regexp, int from_tty)
       if (colon && *(colon + 1) != ':')
        {
          int colon_index;
-         char * file_name;
 
          colon_index = colon - regexp;
          file_name = alloca (colon_index + 1);
@@ -4074,7 +4073,7 @@ not_interesting_fname (const char *fname)
 
   for (i = 0; illegal_aliens[i]; i++)
     {
-      if (strcmp (fname, illegal_aliens[i]) == 0)
+      if (filename_cmp (fname, illegal_aliens[i]) == 0)
        return 1;
     }
   return 0;
@@ -4103,12 +4102,7 @@ maybe_add_partial_symtab_filename (const char *filename, const char *fullname,
   if (not_interesting_fname (filename))
     return;
   if (!filename_seen (filename, 1, data->first)
-#if HAVE_DOS_BASED_FILE_SYSTEM
-      && strncasecmp (filename, data->text, data->text_len) == 0
-#else
-      && strncmp (filename, data->text, data->text_len) == 0
-#endif
-      )
+      && filename_ncmp (filename, data->text, data->text_len) == 0)
     {
       /* This file matches for a completion; add it to the
         current list of matches.  */
@@ -4121,12 +4115,7 @@ maybe_add_partial_symtab_filename (const char *filename, const char *fullname,
 
       if (base_name != filename
          && !filename_seen (base_name, 1, data->first)
-#if HAVE_DOS_BASED_FILE_SYSTEM
-         && strncasecmp (base_name, data->text, data->text_len) == 0
-#else
-         && strncmp (base_name, data->text, data->text_len) == 0
-#endif
-         )
+         && filename_ncmp (base_name, data->text, data->text_len) == 0)
        add_filename_to_list (base_name, data->text, data->word,
                              data->list, data->list_used, data->list_alloced);
     }
@@ -4160,12 +4149,7 @@ make_source_files_completion_list (char *text, char *word)
       if (not_interesting_fname (s->filename))
        continue;
       if (!filename_seen (s->filename, 1, &first)
-#if HAVE_DOS_BASED_FILE_SYSTEM
-         && strncasecmp (s->filename, text, text_len) == 0
-#else
-         && strncmp (s->filename, text, text_len) == 0
-#endif
-         )
+         && filename_ncmp (s->filename, text, text_len) == 0)
        {
          /* This file matches for a completion; add it to the current
             list of matches.  */
@@ -4181,12 +4165,7 @@ make_source_files_completion_list (char *text, char *word)
          base_name = lbasename (s->filename);
          if (base_name != s->filename
              && !filename_seen (base_name, 1, &first)
-#if HAVE_DOS_BASED_FILE_SYSTEM
-             && strncasecmp (base_name, text, text_len) == 0
-#else
-             && strncmp (base_name, text, text_len) == 0
-#endif
-             )
+             && filename_ncmp (base_name, text, text_len) == 0)
            add_filename_to_list (base_name, text, word,
                                  &list, &list_used, &list_alloced);
        }
@@ -4402,7 +4381,7 @@ decode_line_spec (char *string, int funfirstline)
 
   sals = decode_line_1 (&string, funfirstline,
                        cursal.symtab, cursal.line,
-                       (char ***) NULL, NULL);
+                       NULL, NULL);
 
   if (*string)
     error (_("Junk at end of line specification: %s"), string);