From b57a636e4b4d23ba89c9d18118ed231500b0de06 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sun, 16 Dec 2012 18:57:16 +0000 Subject: gdb/ Code cleanup. * breakpoint.c (clear_command): Remove variable sal_name_len and its initialization, remove it from the compare_filenames_for_search call. * dwarf2read.c (dw2_map_symtabs_matching_filename): Remove variable name_len and its initialization, remove it from the compare_filenames_for_search calls. * psymtab.c (partial_map_symtabs_matching_filename): Likewise. * symtab.c (compare_filenames_for_search): Remove the search_len parameter, update the function comment, new variable search_len initialized from SEARCH_NAME. (iterate_over_some_symtabs): Remove variable name_len and its initialization, remove it from the compare_filenames_for_search calls. * symtab.h (compare_filenames_for_search): Remove the search_len parameter, --- gdb/psymtab.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'gdb/psymtab.c') diff --git a/gdb/psymtab.c b/gdb/psymtab.c index d6dba3e..027ad38 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -168,7 +168,6 @@ partial_map_symtabs_matching_filename (struct objfile *objfile, { struct partial_symtab *pst; const char *name_basename = lbasename (name); - int name_len = strlen (name); int is_abs = IS_ABSOLUTE_PATH (name); ALL_OBJFILE_PSYMTABS_REQUIRED (objfile, pst) @@ -183,8 +182,7 @@ partial_map_symtabs_matching_filename (struct objfile *objfile, continue; if (FILENAME_CMP (name, pst->filename) == 0 - || (!is_abs && compare_filenames_for_search (pst->filename, - name, name_len))) + || (!is_abs && compare_filenames_for_search (pst->filename, name))) { if (partial_map_expand_apply (objfile, name, full_path, real_path, pst, callback, data)) @@ -205,7 +203,7 @@ partial_map_symtabs_matching_filename (struct objfile *objfile, if (pst->fullname != NULL && (FILENAME_CMP (full_path, pst->fullname) == 0 || (!is_abs && compare_filenames_for_search (pst->fullname, - name, name_len)))) + name)))) { if (partial_map_expand_apply (objfile, name, full_path, real_path, pst, callback, data)) @@ -224,8 +222,7 @@ partial_map_symtabs_matching_filename (struct objfile *objfile, } if (rp != NULL && (FILENAME_CMP (real_path, rp) == 0 - || (!is_abs && compare_filenames_for_search (real_path, - name, name_len)))) + || (!is_abs && compare_filenames_for_search (real_path, name)))) { if (partial_map_expand_apply (objfile, name, full_path, real_path, pst, callback, data)) -- cgit v1.1