Simplify block_find_symbol
authorTom Tromey <tom@tromey.com>
Thu, 30 Mar 2023 14:41:17 +0000 (08:41 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 7 Sep 2023 18:24:21 +0000 (12:24 -0600)
commitb7a92724c5bd926e094ede860049c1067f0584cf
tree10c7ff4050bc9e86896692ae4bf733f56ecd0316
parentdef2803789208a617c429b5dcf2026decb25ce0c
Simplify block_find_symbol

block_find_symbol takes a callback function, but only two callbacks
are ever passed to it -- and they are similar enough that it seems
cleaner to just have block_find_symbol do the work itself.  Also,
block_find_symbol can take a lookup_name_info as an argument,
following the general idea of pushing the construction of these
objects as high in the call chain as feasible.

Regression tested on x86-64 Fedora 38.

Tested-By: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
gdb/block.c
gdb/block.h
gdb/symfile-debug.c
gdb/symtab.c