* psymtab.c (read_psymtabs_with_fullname): Don't call

psymtab_to_fullname if the basenames are different.
This commit is contained in:
Doug Evans 2013-04-03 18:48:54 +00:00
parent ec83d2110d
commit 5ff888ce0e
2 changed files with 10 additions and 1 deletions

View file

@ -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".

View file

@ -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);
}
}