Factor out minsym_found/find_function_start_sal overload
I need to make the ifunc resolving code in elfread.c skip the target
function's prologue like minsym_found does. I thought of factoring
that out to a separate function, but turns out there's already a
comment in find_function_start_sal that says that should agree with
minsym_found...
Instead of making sure the code agrees with a comment, factor out the
common code to a separate function and use it from both places.
Note that the current find_function_start_sal does a bit more than
minsym_found's equivalent (the "We always should ..." bit), though
that's probably a latent bug.
gdb/ChangeLog:
2018-04-26 Pedro Alves <palves@redhat.com>
* linespec.c (minsym_found): Use find_function_start_sal CORE_ADDR
overload.
* symtab.c (find_function_start_sal(CORE_ADDR, obj_section *,bool)):
New, factored out from ...
(find_function_start_sal(symbol *, int)): ... this. Reimplement
and use bool.
* symtab.h (find_function_start_sal(CORE_ADDR, obj_section *,bool)):
New.
(find_function_start_sal(symbol *, int)): Change boolean parameter
type to bool.