Re: [PATCH 4/9] Change `minimal_symbols' to std::vector in linespec.c structures

Tom Tromey
2018-08-11T15:01:01Z

>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> This patch converts linespec.c's linespec.label_symbols member from a
Keith> VEC to a std::vector.

Keith> gdb/ChangeLog:

Keith> * linespec.c (struct linespec) <minimal_symbols>: Change type to
Keith> std::vector. Update all users.
Keith> (struct collect_info) <minimal_symbols>: Likewise.
Keith> (find_method, find_function_symbols, find_linespec_symbols): Change
Keith> `minsyms' parameter to std::vector. Update all callers.

Thank you.

Keith> + qsort (ls->minimal_symbols->data (), ls->minimal_symbols->size (),
Keith> + sizeof (bound_minimal_symbol), compare_msymbols);

I think this should be changed to use std::sort.
If I'm reading correctly, this is the only caller of compare_msymbols,
so this transform shouldn't be too hard to do.

Tom