aboutsummaryrefslogtreecommitdiff
path: root/gdb/psymtab.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-05-08 22:38:19 +0000
committerDoug Evans <dje@google.com>2013-05-08 22:38:19 +0000
commit680d1742c462872df7be8acd25f84fa50be1ede1 (patch)
treebe261a0f5338c40401cd7d933389f5c79645e6e5 /gdb/psymtab.c
parent5e4c3ac43b67c3bc0181ca7a86f50f6183b18922 (diff)
downloadgdb-680d1742c462872df7be8acd25f84fa50be1ede1.zip
gdb-680d1742c462872df7be8acd25f84fa50be1ede1.tar.gz
gdb-680d1742c462872df7be8acd25f84fa50be1ede1.tar.bz2
* psymtab.c (expand_symtabs_matching_via_partial): Fix file name
matching test.
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r--gdb/psymtab.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 878bd82..3a1b993 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -1400,15 +1400,21 @@ expand_symtabs_matching_via_partial
if (file_matcher)
{
+ int match;
+
if (ps->anonymous)
continue;
- /* Before we invoke realpath, which can get expensive when many
- files are involved, do a quick comparison of the basenames. */
- if (!(*file_matcher) (ps->filename, data, 0)
- && (basenames_may_differ
+ match = (*file_matcher) (ps->filename, data, 0);
+ if (!match)
+ {
+ /* Before we invoke realpath, which can get expensive when many
+ files are involved, do a quick comparison of the basenames. */
+ if (basenames_may_differ
|| (*file_matcher) (lbasename (ps->filename), data, 1))
- && !(*file_matcher) (psymtab_to_fullname (ps), data, 0))
+ match = (*file_matcher) (psymtab_to_fullname (ps), data, 0);
+ }
+ if (!match)
continue;
}