Rename lookup_symbol_static to lookup_symbol_in_static_block,

and lookup_static_symbol_aux to lookup_static_symbol.

gdb/ChangeLog:

	* symtab.c (lookup_static_symbol): Renamed from
	lookup_static_symbol_aux.  All callers updated.
	(lookup_symbol_in_static_block): Renamed from lookup_symbol_static.
	All callers updated.
This commit is contained in:
Doug Evans 2014-11-06 22:56:46 -08:00
parent 358d6ab39c
commit 24d864bb95
6 changed files with 26 additions and 18 deletions

View file

@ -1,3 +1,10 @@
2014-11-06 Doug Evans <xdje42@gmail.com>
* symtab.c (lookup_static_symbol): Renamed from
lookup_static_symbol_aux. All callers updated.
(lookup_symbol_in_static_block): Renamed from lookup_symbol_static.
All callers updated.
2014-11-06 Doug Evans <xdje42@gmail.com> 2014-11-06 Doug Evans <xdje42@gmail.com>
* block.h (ALL_BLOCK_SYMBOLS_WITH_NAME): New macro. * block.h (ALL_BLOCK_SYMBOLS_WITH_NAME): New macro.

View file

@ -615,7 +615,7 @@ lookup_symbol_file (const char *name,
{ {
struct symbol *sym = NULL; struct symbol *sym = NULL;
sym = lookup_symbol_static (name, block, domain); sym = lookup_symbol_in_static_block (name, block, domain);
if (sym != NULL) if (sym != NULL)
return sym; return sym;
@ -771,14 +771,15 @@ find_symbol_in_baseclass (struct type *parent_type, const char *name,
len = strlen (base_name) + 2 + strlen (name) + 1; len = strlen (base_name) + 2 + strlen (name) + 1;
concatenated_name = xrealloc (concatenated_name, len); concatenated_name = xrealloc (concatenated_name, len);
xsnprintf (concatenated_name, len, "%s::%s", base_name, name); xsnprintf (concatenated_name, len, "%s::%s", base_name, name);
sym = lookup_symbol_static (concatenated_name, block, VAR_DOMAIN); sym = lookup_symbol_in_static_block (concatenated_name, block,
VAR_DOMAIN);
if (sym != NULL) if (sym != NULL)
break; break;
/* Nope. We now have to search all static blocks in all objfiles, /* Nope. We now have to search all static blocks in all objfiles,
even if block != NULL, because there's no guarantees as to which even if block != NULL, because there's no guarantees as to which
symtab the symbol we want is in. */ symtab the symbol we want is in. */
sym = lookup_static_symbol_aux (concatenated_name, VAR_DOMAIN); sym = lookup_static_symbol (concatenated_name, VAR_DOMAIN);
if (sym != NULL) if (sym != NULL)
break; break;
@ -849,7 +850,7 @@ cp_lookup_nested_symbol (struct type *parent_type,
concatenated_name = alloca (size); concatenated_name = alloca (size);
xsnprintf (concatenated_name, size, "%s::%s", xsnprintf (concatenated_name, size, "%s::%s",
parent_name, nested_name); parent_name, nested_name);
sym = lookup_static_symbol_aux (concatenated_name, VAR_DOMAIN); sym = lookup_static_symbol (concatenated_name, VAR_DOMAIN);
if (sym != NULL) if (sym != NULL)
return sym; return sym;

View file

@ -1179,7 +1179,7 @@ push_module_name (struct parser_state *ps, struct type *module,
char *copy; char *copy;
copy = copy_name (name); copy = copy_name (name);
sym = lookup_symbol_static (copy, expression_context_block, sym = lookup_symbol_in_static_block (copy, expression_context_block,
VAR_DOMAIN); VAR_DOMAIN);
if (sym != NULL) if (sym != NULL)
sym = lookup_symbol_global (copy, expression_context_block, sym = lookup_symbol_global (copy, expression_context_block,

View file

@ -1471,13 +1471,13 @@ lookup_symbol_aux (const char *name, const struct block *block,
/* Now search all static file-level symbols. Not strictly correct, /* Now search all static file-level symbols. Not strictly correct,
but more useful than an error. */ but more useful than an error. */
return lookup_static_symbol_aux (name, domain); return lookup_static_symbol (name, domain);
} }
/* See symtab.h. */ /* See symtab.h. */
struct symbol * struct symbol *
lookup_static_symbol_aux (const char *name, const domain_enum domain) lookup_static_symbol (const char *name, const domain_enum domain)
{ {
struct objfile *objfile; struct objfile *objfile;
struct symbol *sym; struct symbol *sym;
@ -1791,7 +1791,7 @@ basic_lookup_symbol_nonlocal (const char *name,
than that one, so I don't think we should worry about that for than that one, so I don't think we should worry about that for
now. */ now. */
sym = lookup_symbol_static (name, block, domain); sym = lookup_symbol_in_static_block (name, block, domain);
if (sym != NULL) if (sym != NULL)
return sym; return sym;
@ -1801,7 +1801,7 @@ basic_lookup_symbol_nonlocal (const char *name,
/* See symtab.h. */ /* See symtab.h. */
struct symbol * struct symbol *
lookup_symbol_static (const char *name, lookup_symbol_in_static_block (const char *name,
const struct block *block, const struct block *block,
const domain_enum domain) const domain_enum domain)
{ {

View file

@ -1092,7 +1092,7 @@ extern struct symbol *basic_lookup_symbol_nonlocal (const char *,
Upon success sets BLOCK_FOUND and fixes up the symbol's section Upon success sets BLOCK_FOUND and fixes up the symbol's section
if necessary. */ if necessary. */
extern struct symbol *lookup_symbol_static (const char *name, extern struct symbol *lookup_symbol_in_static_block (const char *name,
const struct block *block, const struct block *block,
const domain_enum domain); const domain_enum domain);
@ -1122,7 +1122,7 @@ extern struct symbol *lookup_language_this (const struct language_defn *lang,
Upon success sets BLOCK_FOUND and fixes up the symbol's section Upon success sets BLOCK_FOUND and fixes up the symbol's section
if necessary. */ if necessary. */
extern struct symbol *lookup_static_symbol_aux (const char *name, extern struct symbol *lookup_static_symbol (const char *name,
const domain_enum domain); const domain_enum domain);
/* Lookup a [struct, union, enum] by name, within a specified block. */ /* Lookup a [struct, union, enum] by name, within a specified block. */

View file

@ -3576,7 +3576,7 @@ value_maybe_namespace_elt (const struct type *curtype,
+ strlen (name) + 1); + strlen (name) + 1);
sprintf (concatenated_name, "%s::%s", namespace_name, name); sprintf (concatenated_name, "%s::%s", namespace_name, name);
sym = lookup_static_symbol_aux (concatenated_name, VAR_DOMAIN); sym = lookup_static_symbol (concatenated_name, VAR_DOMAIN);
} }
if (sym == NULL) if (sym == NULL)