> > > +static struct obstack cache_space; > > > + > > > +/* The root of the hash table used to implement our symbol cache. */ > > > +static struct cache_entry *cache[HASH_SIZE]; > > > > Seems to me this should be per program space, not global? > > You're right. I'm in the middle of testing the DLL load/unload > cleanup patches, but I will take care of it right after. I thought I was going to be done in under an hour, but not so fast, after all... Attached is what I ended checking in. 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. Tested on x86_64-linux, no regression. Pushed. Thanks for the nudge... -- Joel