[Ada] Add a symbol lookup cache
authorJoel Brobecker <brobecker@adacore.com>
Mon, 10 Feb 2014 05:03:30 +0000 (09:03 +0400)
committerJoel Brobecker <brobecker@adacore.com>
Mon, 10 Feb 2014 07:48:53 +0000 (11:48 +0400)
commit3d9434b5ddc141178be232048e3d944955cc1f91
treed33b9b7550bd5fb4c2ff0bef4f8bed9631e4582f
parentf0c5f9b2b8438e44abc30d18574a4d2ea44d2f67
[Ada] Add a symbol lookup cache

This patch implements the caching mechanism alluded to in a comment
next to some stubbed functions.

gdb/ChangeLog:

        * ada-lang.c (HASH_SIZE): New macro.
        (struct cache_entry): New type.
        (cache_space, cache): New static globals.
        (ada_clear_symbol_cache, find_entry): New functions.
        (lookup_cached_symbol, cache_symbol): Implement.
        (ada_new_objfile_observer, ada_free_objfile_observer): New.
        (_initialize_ada_language): Attach ada_new_objfile_observer
        and ada_free_objfile_observer.
gdb/ChangeLog
gdb/ada-lang.c