diff options
author | Doug Evans <xdje42@gmail.com> | 2015-01-11 11:36:36 -0800 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2015-01-11 11:36:36 -0800 |
commit | 400678a494713abf8f7ea2367f213109a2c4b886 (patch) | |
tree | fc74ea22e55a3d4499544bee4f0c8bd52fd87b0a /gdb | |
parent | 9d1d54d5a7e3b634895e6e434646c706eb55c082 (diff) | |
download | binutils-400678a494713abf8f7ea2367f213109a2c4b886.zip binutils-400678a494713abf8f7ea2367f213109a2c4b886.tar.gz binutils-400678a494713abf8f7ea2367f213109a2c4b886.tar.bz2 |
Improve comments for symbol_cache_mark_{not_,}found.
gdb/ChangeLog:
* symtab.c (symbol_cache_mark_found): Improve function comment.
Rename parameter objfile to objfile_context.
(symbol_cache_mark_not_found): Ditto.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/symtab.c | 14 |
2 files changed, 16 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1bd2b46..de5eef8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +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. diff --git a/gdb/symtab.c b/gdb/symtab.c index 7193131..698de5f 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1426,12 +1426,16 @@ symbol_cache_clear_slot (struct symbol_cache_slot *slot) 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; @@ -1441,11 +1445,13 @@ symbol_cache_mark_found (struct block_symbol_cache *bsc, 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, |