diff options
author | Tom Tromey <tromey@adacore.com> | 2020-04-01 07:47:13 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-04-01 07:47:13 -0600 |
commit | 8c072cb6a19abdc9d4b93c19a1d609fe1a486c32 (patch) | |
tree | c86d4d5e1100f0394e216a397bd125557c7e7c29 /gdb/language.c | |
parent | 81e3a1d00cbe19c1a9b189601c269d1b5db02343 (diff) | |
download | gdb-8c072cb6a19abdc9d4b93c19a1d609fe1a486c32.zip gdb-8c072cb6a19abdc9d4b93c19a1d609fe1a486c32.tar.gz gdb-8c072cb6a19abdc9d4b93c19a1d609fe1a486c32.tar.bz2 |
Avoid some copying in psymtab.c
I noticed that psymtab.c was always copying the search string in
psymtab_search_name, even when it wasn't necessary. This patch
removes this function in favor of using the make_ignore_params feature
of lookup_name_info.
Once I had done that, I noticed that lookup_partial_symbol was
creating a lookup_name_info. However, this function called in loops,
causing even more excess allocation. This patch further fixes this by
hosting the creation of the lookup_name_info into the callers.
gdb/ChangeLog
2020-04-01 Tom Tromey <tromey@adacore.com>
* psymtab.c (psymtab_search_name): Remove function.
(psym_lookup_symbol): Create search name and lookup name here.
(lookup_partial_symbol): Remove "name" parameter; add
lookup_name.
(psym_expand_symtabs_for_function): Update.
Diffstat (limited to 'gdb/language.c')
0 files changed, 0 insertions, 0 deletions