+2015-01-11 Doug Evans <xdje42@gmail.com>
+
+ * symtab.c (symbol_cache_mark_found): Improve function comment.
+ Rename parameter objfile to objfile_context.
+ (symbol_cache_mark_not_found): Ditto.
+
2015-01-10 Doug Evans <xdje42@gmail.com>
Add symbol lookup cache.
slot->state = SYMBOL_SLOT_UNUSED;
}
-/* Mark SYMBOL as found in SLOT. */
+/* Mark SYMBOL as found in SLOT.
+ OBJFILE_CONTEXT is the current objfile when the lookup was done, or NULL
+ if it's not needed to distinguish lookups (STATIC_BLOCK). It is *not*
+ necessarily the objfile the symbol was found in. */
static void
symbol_cache_mark_found (struct block_symbol_cache *bsc,
struct symbol_cache_slot *slot,
- struct objfile *objfile, struct symbol *symbol)
+ struct objfile *objfile_context,
+ struct symbol *symbol)
{
if (bsc == NULL)
return;
symbol_cache_clear_slot (slot);
}
slot->state = SYMBOL_SLOT_FOUND;
- slot->objfile_context = objfile;
+ slot->objfile_context = objfile_context;
slot->value.found = symbol;
}
-/* Mark symbol NAME, DOMAIN as not found in SLOT. */
+/* Mark symbol NAME, DOMAIN as not found in SLOT.
+ OBJFILE_CONTEXT is the current objfile when the lookup was done, or NULL
+ if it's not needed to distinguish lookups (STATIC_BLOCK). */
static void
symbol_cache_mark_not_found (struct block_symbol_cache *bsc,