2014-11-06 Doug Evans <xdje42@gmail.com>
+ * symtab.c (lookup_global_symbol): Renamed from lookup_symbol_global.
+ All callers updated.
+ * symtab.h (lookup_global_symbol): Update decl.
+ (lookup_static_symbol): Move decl to better location.
+
+2014-11-06 Doug Evans <xdje42@gmail.com>
+
* symtab.c (basic_lookup_symbol_nonlocal): Add comment.
2014-11-06 Doug Evans <xdje42@gmail.com>
}
else
{
- sym = lookup_symbol_global (name, block, domain);
+ sym = lookup_global_symbol (name, block, domain);
}
if (sym != NULL)
/* Lookup a class named KLASS. If none is found, there is nothing
more that can be done. */
- klass_sym = lookup_symbol_global (klass, block, domain);
+ klass_sym = lookup_global_symbol (klass, block, domain);
if (klass_sym == NULL)
{
do_cleanups (cleanup);
sym = lookup_symbol_in_static_block (copy, expression_context_block,
VAR_DOMAIN);
if (sym != NULL)
- sym = lookup_symbol_global (copy, expression_context_block,
+ sym = lookup_global_symbol (copy, expression_context_block,
VAR_DOMAIN);
if (sym != NULL)
TRY_CATCH (except, RETURN_MASK_ALL)
{
- symbol = lookup_symbol_global (name, NULL, domain);
+ symbol = lookup_global_symbol (name, NULL, domain);
}
do_cleanups (cleanups);
GDBSCM_HANDLE_GDB_EXCEPTION (except);
TRY_CATCH (except, RETURN_MASK_ALL)
{
- symbol = lookup_symbol_global (name, NULL, domain);
+ symbol = lookup_global_symbol (name, NULL, domain);
}
GDB_PY_HANDLE_EXCEPTION (except);
if (sym != NULL)
return sym;
- return lookup_symbol_global (name, block, domain);
+ return lookup_global_symbol (name, block, domain);
}
/* See symtab.h. */
/* See symtab.h. */
struct symbol *
-lookup_symbol_global (const char *name,
+lookup_global_symbol (const char *name,
const struct block *block,
const domain_enum domain)
{
const struct block *block,
const domain_enum domain);
+/* Search all static file-level symbols for NAME from DOMAIN.
+ Upon success sets BLOCK_FOUND and fixes up the symbol's section
+ if necessary. */
+
+extern struct symbol *lookup_static_symbol (const char *name,
+ const domain_enum domain);
+
/* Lookup a symbol in all files' global blocks.
Upon success sets BLOCK_FOUND and fixes up the symbol's section
if necessary. */
-extern struct symbol *lookup_symbol_global (const char *name,
+extern struct symbol *lookup_global_symbol (const char *name,
const struct block *block,
const domain_enum domain);
extern struct symbol *lookup_language_this (const struct language_defn *lang,
const struct block *block);
-/* Search all static file-level symbols for NAME from DOMAIN.
- Upon success sets BLOCK_FOUND and fixes up the symbol's section
- if necessary. */
-
-extern struct symbol *lookup_static_symbol (const char *name,
- const domain_enum domain);
-
/* Lookup a [struct, union, enum] by name, within a specified block. */
extern struct type *lookup_struct (const char *, const struct block *);