Index: psymtab.c =================================================================== RCS file: /cvs/src/src/gdb/psymtab.c,v retrieving revision 1.7 diff -u -p -r1.7 psymtab.c --- psymtab.c 13 Jul 2010 20:52:52 -0000 1.7 +++ psymtab.c 26 Jul 2010 18:38:24 -0000 @@ -409,15 +409,6 @@ lookup_symbol_aux_psymtabs (struct objfi int block_index, const char *name, const domain_enum domain) { - struct partial_symtab *ps; - const int psymtab_index = (block_index == GLOBAL_BLOCK ? 1 : 0); - - ALL_OBJFILE_PSYMTABS (objfile, ps) - { - if (!ps->readin && lookup_partial_symbol (ps, name, psymtab_index, domain)) - return PSYMTAB_TO_SYMTAB (ps); - } - return NULL; } @@ -426,7 +417,27 @@ pre_expand_symtabs_matching_psymtabs (st int kind, const char *name, domain_enum domain) { - /* Nothing. */ + char *paren; + struct partial_symtab *pst; + const int psymtab_index = (kind == GLOBAL_BLOCK ? 1 : 0); + + /* If NAME contains overload information, strip it, since psymtabs only + contain the method name. */ + paren = strchr (name, '('); + if (paren != NULL) + { + char *tmp = alloca (strlen (name)); + memcpy (tmp, name, paren - name); + tmp[name - paren] = '\0'; + name = tmp; + } + + ALL_OBJFILE_PSYMTABS (objfile, pst) + { + if (!pst->readin + && lookup_partial_symbol (pst, name, psymtab_index, domain) != NULL) + PSYMTAB_TO_SYMTAB (pst); + } } /* Look, in partial_symtab PST, for symbol whose natural name is NAME.