> It turns out that ada-lang.c accidently never uses its symbol lookup > cache (AFAICT!). > Rather, it will create a new one for each lookup, not recording the > cache in pspace_data, > and leaking the memory. Indeed! Attached is a patch that fixes this issue. I've tested on x86_64-linux, after having applied your testscase update (https://www.sourceware.org/ml/gdb-patches/2015-01/msg00510.html), as well as the fix you posted in PR 17855 (https://sourceware.org/bugzilla/show_bug.cgi?id=17855). No regression. As to whether we should deactivate it entirely for 7.9, I would personally prefer we tried to fix the bug(s), and see where we get. It used to work fine until I accidently botched the initialization of that cache when I tried to make it per-program-space. That's what I'll do anyway for AdaCore's version. However, if you think it's better to disable it entirely for the FSF version, I will accept that. gdb/ChangeLog: PR gdb/17854: * ada-lang.c (ada_get_symbol_cache): Set pspace_data->sym_cache when allocating a new one. We need your fix from PR 17855 before we can commit this one, because your testcase update reveals a regression as soon as the cache gets activated (I tested your patch on x86_64-linux as part of this testing). I'll start looking at re-caching entries obtained from cache. It seems that it's a real waste of memory, but not bad enough to actually cause a functional issue? Thanks, -- Joel