[Ada] Make the symbol cache per-program-space.
This patch moves the Ada symbol cache to per-program-space data.
gdb/ChangeLog:
* ada-lang.c (struct cache_entry, HASH_SIZE): Move definition up.
(struct ada_symbol_cache): New.
(ada_free_symbol_cache): Forward declare.
(struct ada_pspace_data): New.
(ada_pspace_data_handle): New static global.
(get_ada_pspace_data, ada_pspace_data_cleanup)
(ada_init_symbol_cache, ada_free_symbol_cache): New functions.
(cache_space, cache): Delete, now folded inside struct
ada_pspace_data.
(ada_get_symbol_cache): New function.
(ada_clear_symbol_cache, find_entry, cache_symbol): Adjust
implementation.
(_initialize_ada_language): Remove initialization of cache_space.
Move call to observer_attach_inferior_exit up, grouping it
with the other observer registrations inside this function.
Rename command to be more general. Add call to
register_program_space_data_with_cleanup.