]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Remove enter_symbol_lookup
authorTom Tromey <tom@tromey.com>
Tue, 11 Feb 2025 20:39:16 +0000 (13:39 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 10 Sep 2025 22:07:58 +0000 (16:07 -0600)
commit00dd832815cd18a18532710846bb529ce22de5c1
treeb011c91aa5a7f78c113b2ec35b2898d1a50b8e39
parent8ac273ba2afb69212456b4033e480d14f2f2744d
Remove enter_symbol_lookup

The "enter_symbol_lookup" class was introduced to work around the lack
of reentrancy in symbol lookup.  There were two problems here:

1. The DWARF reader kept a mark bit on the dwarf2_per_cu_data object.
   This bit is gone now, replaced with a local mark vector.

2. Some spots in gdb first examined the expanded symbol tables, and
   then on failure expanded some symtabs and searched the newly
   expanded ones (skipping previousy-expanded ones).  Fixing this has
   been the main point of this series.

Now that both of these barriers are gone, I think enter_symbol_lookup
can be removed.

One proof of this idea is that, without the first fix mentioned above,
py-symbol.exp regressed because gdbpy_lookup_static_symbols did not
first ensure that the current language was set -- i.e., there was a
latent bug in the enter_symbol_lookup patch anyway.

Acked-By: Simon Marchi <simon.marchi@efficios.com>
gdb/symtab.c