diff options
author | Doug Evans <dje@google.com> | 2013-05-08 22:38:19 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2013-05-08 22:38:19 +0000 |
commit | 680d1742c462872df7be8acd25f84fa50be1ede1 (patch) | |
tree | be261a0f5338c40401cd7d933389f5c79645e6e5 /gdb/psymtab.c | |
parent | 5e4c3ac43b67c3bc0181ca7a86f50f6183b18922 (diff) | |
download | gdb-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.c | 16 |
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; } |