public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [COMMITTED PATCH] Improve function comments of symbol_cache_mark_found/not_found
@ 2015-01-11 19:41 Doug Evans
  0 siblings, 0 replies; only message in thread
From: Doug Evans @ 2015-01-11 19:41 UTC (permalink / raw)
  To: gdb-patches

Hi.

Just a couple of comment improvements.

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): Improve function comment.

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,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-01-11 19:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-11 19:41 [COMMITTED PATCH] Improve function comments of symbol_cache_mark_found/not_found Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).