This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Remove last Ada cleanups


Hi Tom,

On Sun, Jun 03, 2018 at 04:27:35PM -0600, Tom Tromey wrote:
> This removes the last cleanups from the Ada code by changing
> ada_lookup_symbol_list's out parameter to be a std::vector, and then
> fixing up the fallout.

Thanks for the patch, it's a nice cleanup (pardon the pun!).

> This is a relatively shallow change.  Deeper changes are possible, for
> example (1) changing various other functions to accept a vector rather
> than a pointer, or (2) changing ada_lookup_symbol_list to return the
> vector and omitting the length entirely.

Right. I like the progressive approach, though. I can definitely
see myself or someone else at AdaCore making those cleanups at some
point, so it's completely OK to leave these for us to cleanup.

> Tested by the buildbot, but I'll wait for Joel to test these as well.
> 
> gdb/ChangeLog
> 2018-06-03  Tom Tromey  <tom@tromey.com>
> 
> 	* ada-lang.h (ada_lookup_symbol_list): Update.
> 	* ada-lang.c (resolve_subexp): Update.
> 	(symbols_are_identical_enums): Change type of syms.  Remove nsyms
> 	parameter.
> 	(remove_extra_symbols, remove_irrelevant_renamings): Likewise.
> 	(ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
> 	results parameter to std::vector.
> 	(ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
> 	Update.
> 	* ada-exp.y (block_lookup): Update.
> 	(select_possible_type_sym): Change type of syms.  Remove nsyms
> 	parameter.
> 	(write_var_or_type, write_name_assoc): Update.

Reviewed, and also tested locally, so good to go. Thanks again, Tom!

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]