contrib/gdb-7/gdb/cp-namespace.c
static struct symbol *
lookup_symbol_file (const char *name,
		    const struct block *block,
		    const domain_enum domain,
		    int anonymous_namespace)
{
  struct symbol *sym = NULL;

  sym = lookup_symbol_static (name, block, domain);
  if (sym != NULL)
    return sym;

  if (anonymous_namespace)
    {
      /* Symbols defined in anonymous namespaces have external linkage
	 but should be treated as local to a single file nonetheless.
	 So we only search the current file's global block.  */

      const struct block *global_block = block_global_block (block);
      
      if (global_block != NULL)
	sym = lookup_symbol_aux_block (name, global_block, domain);
    }
  else
    {
      sym = lookup_symbol_global (name, block, domain);
    }

  return sym;
}
/* Look up NAME in BLOCK's static block and in global blocks.  If
   ANONYMOUS_NAMESPACE is nonzero, the symbol in question is located
   within an anonymous namespace.  Other arguments are as in
   cp_lookup_symbol_nonlocal.  */
Look up NAME in BLOCK's static block and in global blocks.  If
ANONYMOUS_NAMESPACE is nonzero, the symbol in question is located
within an anonymous namespace.  Other arguments are as in
cp_lookup_symbol_nonlocal.
Look up NAME in BLOCK ' s static block and in global blocks . If ANONYMOUS_NAMESPACE is nonzero the symbol in question is located within an anonymous namespace . Other arguments are as in cp_lookup_symbol_nonlocal .
static struct symbol *
lookup_symbol_file (const char *name,
		    const struct block *block,
		    const domain_enum domain,
		    int anonymous_namespace)
{
  struct symbol *sym = NULL;
  sym = lookup_symbol_static (name, block, domain);
  if (sym != NULL)
    return sym;
  if (anonymous_namespace)
    {
      const struct block *global_block = block_global_block (block);
      if (global_block != NULL)
	sym = lookup_symbol_aux_block (name, global_block, domain);
    }
  else
    {
      sym = lookup_symbol_global (name, block, domain);
    }
  return sym;
}
static struct symbol * lookup_symbol_file ( const char * name , const struct block * block , const domain_enum domain , int anonymous_namespace ) { struct symbol * sym = NULL ; sym = lookup_symbol_static ( name , block , domain ) ; if ( sym != NULL ) return sym ; if ( anonymous_namespace ) { const struct block * global_block = block_global_block ( block ) ; if ( global_block != NULL ) sym = lookup_symbol_aux_block ( name , global_block , domain ) ; } else { sym = lookup_symbol_global ( name , block , domain ) ; } return sym ; }
Look up NAME in BLOCK's static block and in global blocks.
Look up NAME in BLOCK ' s static block and in global blocks .
/* Symbols defined in anonymous namespaces have external linkage
	 but should be treated as local to a single file nonetheless.
	 So we only search the current file's global block.  */