aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-12-16 18:57:16 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-12-16 18:57:16 +0000
commitb57a636e4b4d23ba89c9d18118ed231500b0de06 (patch)
tree0f84de7c407e0db84050d712234af6958f96f332 /gdb/dwarf2read.c
parent2344b8da6ee2fa235bce354c0da505933c055559 (diff)
downloadgdb-b57a636e4b4d23ba89c9d18118ed231500b0de06.zip
gdb-b57a636e4b4d23ba89c9d18118ed231500b0de06.tar.gz
gdb-b57a636e4b4d23ba89c9d18118ed231500b0de06.tar.bz2
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,
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 4d5323e..beb2ea8 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -3068,7 +3068,6 @@ dw2_map_symtabs_matching_filename (struct objfile *objfile, const char *name,
{
int i;
const char *name_basename = lbasename (name);
- int name_len = strlen (name);
int is_abs = IS_ABSOLUTE_PATH (name);
dw2_setup (objfile);
@@ -3095,8 +3094,7 @@ dw2_map_symtabs_matching_filename (struct objfile *objfile, const char *name,
const char *this_name = file_data->file_names[j];
if (FILENAME_CMP (name, this_name) == 0
- || (!is_abs && compare_filenames_for_search (this_name,
- name, name_len)))
+ || (!is_abs && compare_filenames_for_search (this_name, name)))
{
if (dw2_map_expand_apply (objfile, per_cu,
name, full_path, real_path,
@@ -3119,7 +3117,7 @@ dw2_map_symtabs_matching_filename (struct objfile *objfile, const char *name,
&& (FILENAME_CMP (full_path, this_real_name) == 0
|| (!is_abs
&& compare_filenames_for_search (this_real_name,
- name, name_len))))
+ name))))
{
if (dw2_map_expand_apply (objfile, per_cu,
name, full_path, real_path,
@@ -3137,7 +3135,7 @@ dw2_map_symtabs_matching_filename (struct objfile *objfile, const char *name,
&& (FILENAME_CMP (real_path, this_real_name) == 0
|| (!is_abs
&& compare_filenames_for_search (this_real_name,
- name, name_len))))
+ name))))
{
if (dw2_map_expand_apply (objfile, per_cu,
name, full_path, real_path,