Remove some cleanups from search_minsyms_for_name
authorTom Tromey <tom@tromey.com>
Sat, 31 Mar 2018 16:32:00 +0000 (10:32 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 5 Apr 2018 13:39:33 +0000 (07:39 -0600)
commit41c1efc614472cdc74397e734f5a66018362a80a
tree97d77b6582dcdfbec4f3436251c058c9243411cf
parent65bd20451fc7e5aea1f0283433f95fb2fe60771d
Remove some cleanups from search_minsyms_for_name

This changes struct collect_minsyms to use a std::vector, which
enables the removal of a cleanup from search_minsyms_for_name.  This
also changes iterate_over_minimal_symbols to take a
gdb::function_view, which makes a function in linespec.c more
type-safe.

ChangeLog
2018-04-05  Tom Tromey  <tom@tromey.com>

* minsyms.h (iterate_over_minimal_symbols): Update.
* minsyms.c (iterate_over_minimal_symbols): Take a
gdb::function_view.
* linespec.c (struct collect_minsyms): Remove.
(compare_msyms): Now a std::sort comparator.
(add_minsym): Add parameters.
(search_minsyms_for_name): Update.  Use std::vector.
gdb/ChangeLog
gdb/linespec.c
gdb/minsyms.c
gdb/minsyms.h