contrib/gdb-7/gdb/cp-namespace.c
struct symbol*
cp_lookup_symbol_namespace (const char *scope,
                            const char *name,
                            const struct block *block,
                            const domain_enum domain)
{
  struct symbol *sym;
  
  /* First, try to find the symbol in the given namespace.  */
  sym = cp_lookup_symbol_in_namespace (scope, name,
				       block, domain);
  if (sym != NULL)
    return sym;

  /* Search for name in namespaces imported to this and parent
     blocks.  */
  while (block != NULL)
    {
      sym = cp_lookup_symbol_imports (scope, name, block,
				      domain, 0, 1);

      if (sym)
	return sym;

      block = BLOCK_SUPERBLOCK (block);
    }

  return NULL;
}
/* Searches for NAME in the current namespace, and by applying
    relevant import statements belonging to BLOCK and its parents.
    SCOPE is the namespace scope of the context in which the search is
    being evaluated.  */
Searches for NAME in the current namespace, and by applying
relevant import statements belonging to BLOCK and its parents.
SCOPE is the namespace scope of the context in which the search is
being evaluated.
Searches for NAME in the current namespace and by applying relevant import statements belonging to BLOCK and its parents . SCOPE is the namespace scope of the context in which the search is being evaluated .
struct symbol*
cp_lookup_symbol_namespace (const char *scope,
                            const char *name,
                            const struct block *block,
                            const domain_enum domain)
{
  struct symbol *sym;
  sym = cp_lookup_symbol_in_namespace (scope, name,
				       block, domain);
  if (sym != NULL)
    return sym;
  while (block != NULL)
    {
      sym = cp_lookup_symbol_imports (scope, name, block,
				      domain, 0, 1);
      if (sym)
	return sym;
      block = BLOCK_SUPERBLOCK (block);
    }
  return NULL;
}
struct symbol * cp_lookup_symbol_namespace ( const char * scope , const char * name , const struct block * block , const domain_enum domain ) { struct symbol * sym ; sym = cp_lookup_symbol_in_namespace ( scope , name , block , domain ) ; if ( sym != NULL ) return sym ; while ( block != NULL ) { sym = cp_lookup_symbol_imports ( scope , name , block , domain , 0 , 1 ) ; if ( sym ) return sym ; block = BLOCK_SUPERBLOCK ( block ) ; } return NULL ; }
Searches for NAME in the current namespace, and by applying
relevant import statements belonging to BLOCK and its parents.
Searches for NAME in the current namespace and by applying relevant import statements belonging to BLOCK and its parents .
/* First, try to find the symbol in the given namespace.  */ /* Search for name in namespaces imported to this and parent
     blocks.  */