aboutsummaryrefslogtreecommitdiff
path: root/gdb/psymtab.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-04-03 18:48:54 +0000
committerDoug Evans <dje@google.com>2013-04-03 18:48:54 +0000
commit5ff888ce0e5a14dbf1efea30befca5013e54e0af (patch)
treecd9fd85764a4416f60eca8332cc72bd801606308 /gdb/psymtab.c
parentec83d2110de6831ac2ed0e5a56dc33c60a477eb6 (diff)
downloadgdb-5ff888ce0e5a14dbf1efea30befca5013e54e0af.zip
gdb-5ff888ce0e5a14dbf1efea30befca5013e54e0af.tar.gz
gdb-5ff888ce0e5a14dbf1efea30befca5013e54e0af.tar.bz2
* psymtab.c (read_psymtabs_with_fullname): Don't call
psymtab_to_fullname if the basenames are different.
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r--gdb/psymtab.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index de8a3cc..1d5f0ee 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -1114,7 +1114,11 @@ read_psymtabs_with_fullname (struct objfile *objfile, const char *fullname)
if (p->anonymous)
continue;
- if (filename_cmp (fullname, psymtab_to_fullname (p)) == 0)
+ /* psymtab_to_fullname tries to open the file which is slow.
+ Don't call it if we know the basenames don't match. */
+ if ((basenames_may_differ
+ || filename_cmp (lbasename (fullname), lbasename (p->filename)) == 0)
+ && filename_cmp (fullname, psymtab_to_fullname (p)) == 0)
psymtab_to_symtab (objfile, p);
}
}