aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.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/breakpoint.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/breakpoint.c')
-rw-r--r--gdb/breakpoint.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index cde6bf4..c2ce96c 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -11881,7 +11881,7 @@ clear_command (char *arg, int from_tty)
make_cleanup (VEC_cleanup (breakpoint_p), &found);
for (i = 0; i < sals.nelts; i++)
{
- int is_abs, sal_name_len;
+ int is_abs;
/* If exact pc given, clear bpts at that pc.
If line given (pc == 0), clear all bpts on specified line.
@@ -11897,7 +11897,6 @@ clear_command (char *arg, int from_tty)
sal = sals.sals[i];
is_abs = sal.symtab == NULL ? 1 : IS_ABSOLUTE_PATH (sal.symtab->filename);
- sal_name_len = is_abs ? 0 : strlen (sal.symtab->filename);
/* Find all matching breakpoints and add them to 'found'. */
ALL_BREAKPOINTS (b)
@@ -11930,8 +11929,7 @@ clear_command (char *arg, int from_tty)
line_match = 1;
else if (!IS_ABSOLUTE_PATH (sal.symtab->filename)
&& compare_filenames_for_search (loc->source_file,
- sal.symtab->filename,
- sal_name_len))
+ sal.symtab->filename))
line_match = 1;
}