diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-02-03 16:00:36 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-02-03 16:00:36 +0000 |
commit | af529f8f61348016fc75bcb2e09c8f5d8bd1cc3a (patch) | |
tree | 35fad556c4526038451b6e46eb1c7264e94dfc54 /gdb/breakpoint.c | |
parent | 2f202fde0a4586f88b98439b436e7b0bb1336b26 (diff) | |
download | gdb-af529f8f61348016fc75bcb2e09c8f5d8bd1cc3a.zip gdb-af529f8f61348016fc75bcb2e09c8f5d8bd1cc3a.tar.gz gdb-af529f8f61348016fc75bcb2e09c8f5d8bd1cc3a.tar.bz2 |
gdb/
Code cleanup.
* breakpoint.c (clear_command): Remove variable is_abs, unify the
call of filename_cmp with compare_filenames_for_search.
* dwarf2read.c (dw2_map_symtabs_matching_filename): Remove variable
is_abs, unify the call of FILENAME_CMP with
compare_filenames_for_search. New gdb_asserts for real_path and name.
Unify the call of compare_filenames_for_search with FILENAME_CMP.
* psymtab.c (partial_map_symtabs_matching_filename): Likewise.
* symfile.h (struct quick_symbol_functions): Extend the comment for
map_symtabs_matching_filename.
* symtab.c (compare_filenames_for_search): Remove the function comment
relative path requirement. Handle absolute filenames, with a comment.
(iterate_over_some_symtabs): Remove variable is_abs, unify the call of
FILENAME_CMP with compare_filenames_for_search. New gdb_asserts for
real_path and name. Unify the call of compare_filenames_for_search
with FILENAME_CMP.
(iterate_over_symtabs): New gdb_assert on REAL_PATH.
gdb/testsuite/
* gdb.mi/mi-fullname-deleted.exp: Use double last slash for $srcfileabs.
(compare_filenames_for_search does not match)
(compare_filenames_for_search does match): New tests.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 847b66c..55274c8 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -11941,8 +11941,6 @@ clear_command (char *arg, int from_tty) make_cleanup (VEC_cleanup (breakpoint_p), &found); for (i = 0; i < sals.nelts; i++) { - int is_abs; - /* If exact pc given, clear bpts at that pc. If line given (pc == 0), clear all bpts on specified line. If defaulting, clear all bpts on default line @@ -11956,7 +11954,6 @@ clear_command (char *arg, int from_tty) 1 0 <can't happen> */ sal = sals.sals[i]; - is_abs = sal.symtab == NULL ? 1 : IS_ABSOLUTE_PATH (sal.symtab->filename); /* Find all matching breakpoints and add them to 'found'. */ ALL_BREAKPOINTS (b) @@ -11984,12 +11981,8 @@ clear_command (char *arg, int from_tty) && sal.pspace == loc->pspace && loc->line_number == sal.line) { - if (filename_cmp (loc->symtab->filename, - sal.symtab->filename) == 0) - line_match = 1; - else if (!IS_ABSOLUTE_PATH (sal.symtab->filename) - && compare_filenames_for_search (loc->symtab->filename, - sal.symtab->filename)) + if (compare_filenames_for_search (loc->symtab->filename, + sal.symtab->filename)) line_match = 1; } |