From: Doug Evans Date: Wed, 8 May 2013 22:38:19 +0000 (+0000) Subject: * psymtab.c (expand_symtabs_matching_via_partial): Fix file name X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=680d1742c462872df7be8acd25f84fa50be1ede1;p=binutils-gdb.git * psymtab.c (expand_symtabs_matching_via_partial): Fix file name matching test. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 62cc127e92f..6986d0298c0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-05-08 Doug Evans + + * psymtab.c (expand_symtabs_matching_via_partial): Fix file name + matching test. + 2013-05-08 Joel Brobecker * sol-thread.c (info_cb): Factorize the code a little. diff --git a/gdb/psymtab.c b/gdb/psymtab.c index 878bd82cc04..3a1b993fa82 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; }