mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
2011-03-23 Kai Tietz <ktietz@redhat.com>
* breakpoint.c (clear_command): Use filename_cmp instead of strcmp for comparison. * buildsym.c (watch_main_source_file_lossage): Likewise. (patch_subfile_names): Use IS_DIR_SEPARATOR instead of checking just for slash. * dbxread.c (read_dbx_symtab): Use lbasename instead of strrchr and filename_cmp instead of strcmp for filenames. (add_old_header_file): Use filename_cmp instead of strcmp for comparison. * exec.c (exec_set_section_address): Likewise. * macrotab.c (macro_lookup_inclusion): Likewise. (macro_lookup_inclusion): Likewise. * elfread.c (_initialize_elfread): Likewise. (elfstab_offset_sections): Likewise. (elfstab_offset_sections): Use lbasename instead of strrchr. * mdebugread.c (parse_partial_symbols): Likewise. (arse_partial_symbols): Use filename_(n)cmp instead of str(n)cmp for comparison. * minsyms.c (lookup_minimal_symbol): Likewise. * psymtab.c (read_psymtabs_with_filename): Likewise. * solib.c (solib_read_symbols): Likewise. (reload_shared_libraries_1): Likewise. * symmisc.c (maintenance_print_symbols): Likewise. * symfile.c (separate_debug_file_exists): Likewise. (reread_symbols): Likewise. (find_separate_debug_file_by_debuglink): Likewise. * remote-fileio.c (remote_fileio_func_rename): Likewise. * source.c (add_path): Likewise. * symtab.c (filename_seen): Likewise. (file_matches): Likewise. (print_symbol_info): Likewise. (maybe_add_partial_symtab_filename): Likewise. (make_source_files_completion_list): Likewise. * xml-syscall.c (init_sysinfo): Likewise. * windows-nat.c (_initialize_check_for_gdb_ini): Use IS_DIR_SEPARATOR for checking for trailing path separator.
This commit is contained in:
36
gdb/symtab.c
36
gdb/symtab.c
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
@@ -4073,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;
|
||||
@@ -4102,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. */
|
||||
@@ -4120,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);
|
||||
}
|
||||
@@ -4159,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. */
|
||||
@@ -4180,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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user