Re: [RFA] c++/11734 revisited

Jan Kratochvil
2011-02-06T22:04:25Z

On Tue, 14 Dec 2010 21:02:48 +0100, Keith Seitz wrote:
...
> static struct partial_symbol *
> lookup_partial_symbol (struct partial_symtab *pst, const char *name,
> - int global, domain_enum domain)
> + int global, domain_enum domain, enum language language)
> {
[...]
> + search_name = psymtab_search_name (name, language);
> + cleanup = make_cleanup (xfree, (void *) search_name);
[...]
> - if (strcmp_iw_ordered (SYMBOL_SEARCH_NAME (*center), name) >= 0)
> + if (strcmp_iw_ordered (SYMBOL_SEARCH_NAME (*center),
> + search_name) >= 0)
[...]
> while (top <= real_top
> - && SYMBOL_MATCHES_SEARCH_NAME (*top, name))
> + && SYMBOL_MATCHES_SEARCH_NAME (*top, search_name))
> {
> if (symbol_matches_domain (SYMBOL_LANGUAGE (*top),
> SYMBOL_DOMAIN (*top), domain))
> - return (*top);
> + {
> + do_cleanups (cleanup);
> + return (*top);
> + }
> top++;
> }
> }
> @@ -594,10 +657,14 @@ lookup_partial_symbol (struct partial_sy
> if (symbol_matches_domain (SYMBOL_LANGUAGE (*psym),
> SYMBOL_DOMAIN (*psym), domain)
> && SYMBOL_MATCHES_SEARCH_NAME (*psym, name))
^^^^
Here should be also `search_name' I think.

> - return (*psym);
> + {
> + do_cleanups (cleanup);
> + return (*psym);
> + }

Thanks,
Jan