aboutsummaryrefslogtreecommitdiff
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
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.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/psymtab.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6db6cdf..ad754fc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-03 Doug Evans <dje@google.com>
+
+ * psymtab.c (read_psymtabs_with_fullname): Don't call
+ psymtab_to_fullname if the basenames are different.
+
2013-04-03 Jan Kratochvil <jan.kratochvil@redhat.com>
* NEWS (Changes in GDB 7.6): Update the data-disassemble for "fullname".
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);
}
}