aboutsummaryrefslogtreecommitdiff
path: root/gdb/macrotab.c
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2011-03-23 18:23:56 +0000
committerKai Tietz <kai.tietz@onevision.com>2011-03-23 18:23:56 +0000
commit0ba1096ad5c3a2dc64e6f30c122e7d9c205eef90 (patch)
treefb89e8879076e9ab79a2edbe16146307cb45c9e7 /gdb/macrotab.c
parent663a1470e1a7af58a3d0691f480bc5621bd0c54f (diff)
downloadgdb-0ba1096ad5c3a2dc64e6f30c122e7d9c205eef90.zip
gdb-0ba1096ad5c3a2dc64e6f30c122e7d9c205eef90.tar.gz
gdb-0ba1096ad5c3a2dc64e6f30c122e7d9c205eef90.tar.bz2
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.
Diffstat (limited to 'gdb/macrotab.c')
-rw-r--r--gdb/macrotab.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/macrotab.c b/gdb/macrotab.c
index 84c53c2..cba285d 100644
--- a/gdb/macrotab.c
+++ b/gdb/macrotab.c
@@ -21,6 +21,7 @@
#include "defs.h"
#include "gdb_obstack.h"
#include "splay-tree.h"
+#include "filenames.h"
#include "symtab.h"
#include "symfile.h"
#include "objfiles.h"
@@ -500,7 +501,7 @@ struct macro_source_file *
macro_lookup_inclusion (struct macro_source_file *source, const char *name)
{
/* Is SOURCE itself named NAME? */
- if (strcmp (name, source->filename) == 0)
+ if (filename_cmp (name, source->filename) == 0)
return source;
/* The filename in the source structure is probably a full path, but
@@ -510,11 +511,12 @@ macro_lookup_inclusion (struct macro_source_file *source, const char *name)
int src_name_len = strlen (source->filename);
/* We do mean < here, and not <=; if the lengths are the same,
- then the strcmp above should have triggered, and we need to
+ then the filename_cmp above should have triggered, and we need to
check for a slash here. */
if (name_len < src_name_len
- && source->filename[src_name_len - name_len - 1] == '/'
- && strcmp (name, source->filename + src_name_len - name_len) == 0)
+ && IS_DIR_SEPARATOR (source->filename[src_name_len - name_len - 1])
+ && filename_cmp (name,
+ source->filename + src_name_len - name_len) == 0)
return source;
}