GDB (xrefs)
|
#include "defs.h"
#include "cp-support.h"
#include "gdbsupport/gdb_obstack.h"
#include "symtab.h"
#include "symfile.h"
#include "block.h"
#include "objfiles.h"
#include "gdbtypes.h"
#include "dictionary.h"
#include "command.h"
#include "frame.h"
#include "buildsym.h"
#include "language.h"
#include "namespace.h"
#include <string>
Go to the source code of this file.
Functions | |
static struct block_symbol | cp_lookup_nested_symbol_1 (struct type *container_type, const char *nested_name, const char *concatenated_name, const struct block *block, const domain_enum domain, int basic_lookup, int is_in_anonymous) |
static struct type * | cp_lookup_transparent_type_loop (const char *name, const char *scope, int scope_len) |
void | cp_scan_for_anonymous_namespaces (struct buildsym_compunit *compunit, const struct symbol *const symbol, struct objfile *const objfile) |
int | cp_is_in_anonymous (const char *symbol_name) |
static struct block_symbol | cp_basic_lookup_symbol (const char *name, const struct block *block, const domain_enum domain, int is_in_anonymous) |
static struct block_symbol | cp_lookup_bare_symbol (const struct language_defn *langdef, const char *name, const struct block *block, const domain_enum domain, int search) |
static struct block_symbol | cp_search_static_and_baseclasses (const char *name, const struct block *block, const domain_enum domain, unsigned int prefix_len, int is_in_anonymous) |
static struct block_symbol | cp_lookup_symbol_in_namespace (const char *the_namespace, const char *name, const struct block *block, const domain_enum domain, int search) |
static struct block_symbol | cp_lookup_symbol_via_imports (const char *scope, const char *name, const struct block *block, const domain_enum domain, const int search_scope_first, const int declaration_only, const int search_parents) |
static struct symbol * | search_symbol_list (const char *name, int num, struct symbol **syms) |
struct block_symbol | cp_lookup_symbol_imports_or_template (const char *scope, const char *name, const struct block *block, const domain_enum domain) |
static struct block_symbol | cp_lookup_symbol_via_all_imports (const char *scope, const char *name, const struct block *block, const domain_enum domain) |
struct block_symbol | cp_lookup_symbol_namespace (const char *scope, const char *name, const struct block *block, const domain_enum domain) |
static struct block_symbol | lookup_namespace_scope (const struct language_defn *langdef, const char *name, const struct block *block, const domain_enum domain, const char *scope, int scope_len) |
struct block_symbol | cp_lookup_symbol_nonlocal (const struct language_defn *langdef, const char *name, const struct block *block, const domain_enum domain) |
struct type * | cp_find_type_baseclass_by_name (struct type *parent_type, const char *name) |
static struct block_symbol | find_symbol_in_baseclass (struct type *parent_type, const char *name, const struct block *block, const domain_enum domain, int is_in_anonymous) |
struct block_symbol | cp_lookup_nested_symbol (struct type *parent_type, const char *nested_name, const struct block *block, const domain_enum domain) |
struct type * | cp_lookup_transparent_type (const char *name) |
static void | maintenance_cplus_namespace (const char *args, int from_tty) |
void | _initialize_cp_namespace () |
void _initialize_cp_namespace | ( | ) |
Definition at line 1023 of file cp-namespace.c.
Referenced by initialize_all_files().
|
static |
Definition at line 126 of file cp-namespace.c.
References block_symbol::block, block_global_block(), FULL, lookup_global_symbol(), lookup_symbol_in_block(), lookup_symbol_in_static_block(), name, and block_symbol::symbol.
Referenced by cp_lookup_nested_symbol_1(), and cp_lookup_symbol_in_namespace().
Definition at line 741 of file cp-namespace.c.
References check_typedef(), cp_find_type_baseclass_by_name(), name, type::name(), TYPE_BASECLASS, TYPE_BASECLASS_NAME, and TYPE_N_BASECLASSES.
Referenced by classify_inner_name(), and cp_find_type_baseclass_by_name().
int cp_is_in_anonymous | ( | const char * | symbol_name | ) |
Definition at line 115 of file cp-namespace.c.
References CP_ANONYMOUS_NAMESPACE_STR.
Referenced by cp_lookup_nested_symbol(), cp_lookup_symbol_in_namespace(), and cp_scan_for_anonymous_namespaces().
|
static |
Definition at line 168 of file cp-namespace.c.
References block_symbol::block, block_gdbarch(), check_typedef(), cp_lookup_nested_symbol(), language_lookup_primitive_type_as_symbol(), lookup_global_symbol(), lookup_language_this(), lookup_symbol_in_static_block(), name, type::name(), block_symbol::symbol, target_gdbarch(), type::target_type(), symbol::type(), and VAR_DOMAIN.
Referenced by cp_lookup_symbol_in_namespace(), and lookup_namespace_scope().
struct block_symbol cp_lookup_nested_symbol | ( | struct type * | parent_type, |
const char * | nested_name, | ||
const struct block * | block, | ||
const domain_enum | domain | ||
) |
Definition at line 875 of file cp-namespace.c.
References check_typedef(), cp_is_in_anonymous(), cp_lookup_nested_symbol_1(), domain_name(), type::name(), size, block_symbol::symbol, symbol_lookup_debug, symbol_lookup_debug_printf, and type_name_or_error().
Referenced by classify_inner_name(), and cp_lookup_bare_symbol().
|
static |
Definition at line 810 of file cp-namespace.c.
References check_typedef(), cp_basic_lookup_symbol(), find_symbol_in_baseclass(), lookup_static_symbol(), lookup_symbol_in_static_block(), block_symbol::symbol, and TYPE_N_BASECLASSES.
Referenced by cp_lookup_nested_symbol(), cp_search_static_and_baseclasses(), and find_symbol_in_baseclass().
struct block_symbol cp_lookup_symbol_imports_or_template | ( | const char * | scope, |
const char * | name, | ||
const struct block * | block, | ||
const domain_enum | domain | ||
) |
Definition at line 502 of file cp-namespace.c.
References cp_entire_prefix_len(), cp_lookup_symbol_via_imports(), symbol::domain(), domain_name(), block::function(), symbol::is_cplus_template_function(), general_symbol_info::language(), language_cplus, language_def(), lookup_typename(), template_symbol::n_template_arguments, name, general_symbol_info::natural_name(), search_symbol_list(), block::superblock(), block_symbol::symbol, symbol_lookup_debug_printf, template_symbol::template_arguments, TYPE_N_TEMPLATE_ARGUMENTS, and TYPE_TEMPLATE_ARGUMENTS.
Referenced by lookup_local_symbol().
|
static |
Definition at line 304 of file cp-namespace.c.
References cp_basic_lookup_symbol(), cp_entire_prefix_len(), cp_is_in_anonymous(), cp_lookup_bare_symbol(), cp_search_static_and_baseclasses(), name, and block_symbol::symbol.
Referenced by cp_lookup_symbol_namespace(), cp_lookup_symbol_via_imports(), and lookup_namespace_scope().
struct block_symbol cp_lookup_symbol_namespace | ( | const char * | scope, |
const char * | name, | ||
const struct block * | block, | ||
const domain_enum | domain | ||
) |
Definition at line 613 of file cp-namespace.c.
References cp_lookup_symbol_in_namespace(), cp_lookup_symbol_via_all_imports(), domain_name(), name, block_symbol::symbol, and symbol_lookup_debug_printf.
Referenced by expr::scope_operation::evaluate_funcall(), gen_maybe_namespace_elt(), and value_maybe_namespace_elt().
struct block_symbol cp_lookup_symbol_nonlocal | ( | const struct language_defn * | langdef, |
const char * | name, | ||
const struct block * | block, | ||
const domain_enum | domain | ||
) |
Definition at line 710 of file cp-namespace.c.
References block_scope(), cp_lookup_symbol_via_all_imports(), domain_name(), lookup_namespace_scope(), name, block_symbol::symbol, and symbol_lookup_debug_printf.
Referenced by cplus_language::lookup_symbol_nonlocal(), and f_language::lookup_symbol_nonlocal().
|
static |
Definition at line 589 of file cp-namespace.c.
References cp_lookup_symbol_via_imports(), name, block::superblock(), and block_symbol::symbol.
Referenced by cp_lookup_symbol_namespace(), and cp_lookup_symbol_nonlocal().
|
static |
Definition at line 374 of file cp-namespace.c.
References using_direct::alias, block_using(), cp_lookup_symbol_in_namespace(), cp_lookup_symbol_via_imports(), using_direct::declaration, using_direct::excludes, using_direct::import_dest, using_direct::import_src, name, using_direct::next, using_direct::searched, and block_symbol::symbol.
Referenced by cp_lookup_symbol_imports_or_template(), cp_lookup_symbol_via_all_imports(), and cp_lookup_symbol_via_imports().
struct type * cp_lookup_transparent_type | ( | const char * | name | ) |
Definition at line 961 of file cp-namespace.c.
References basic_lookup_transparent_type(), block_scope(), cp_lookup_transparent_type_loop(), get_selected_block(), and name.
Referenced by cplus_language::lookup_transparent_type().
|
static |
Definition at line 985 of file cp-namespace.c.
References basic_lookup_transparent_type(), cp_find_first_component(), cp_lookup_transparent_type_loop(), type::length(), and name.
Referenced by cp_lookup_transparent_type(), and cp_lookup_transparent_type_loop().
void cp_scan_for_anonymous_namespaces | ( | struct buildsym_compunit * | compunit, |
const struct symbol *const | symbol, | ||
struct objfile *const | objfile | ||
) |
Definition at line 53 of file cp-namespace.c.
References add_using_directive(), CP_ANONYMOUS_NAMESPACE_LEN, CP_ANONYMOUS_NAMESPACE_STR, cp_find_first_component(), cp_is_in_anonymous(), general_symbol_info::demangled_name, buildsym_compunit::get_local_using_directives(), name, and objfile::objfile_obstack.
Referenced by define_symbol(), and new_symbol().
|
static |
Definition at line 247 of file cp-namespace.c.
References type::code(), cp_lookup_nested_symbol_1(), lookup_global_symbol(), lookup_symbol(), lookup_symbol_in_static_block(), name, block_symbol::symbol, symbol::type(), symbol::value_block(), and VAR_DOMAIN.
Referenced by cp_lookup_symbol_in_namespace().
|
static |
Definition at line 770 of file cp-namespace.c.
References cp_lookup_nested_symbol_1(), name, block_symbol::symbol, TYPE_BASECLASS, TYPE_BASECLASS_NAME, and TYPE_N_BASECLASSES.
Referenced by cp_lookup_nested_symbol_1().
|
static |
Definition at line 653 of file cp-namespace.c.
References cp_find_first_component(), cp_lookup_bare_symbol(), cp_lookup_symbol_in_namespace(), lookup_namespace_scope(), name, and block_symbol::symbol.
Referenced by cp_lookup_symbol_nonlocal(), and lookup_namespace_scope().
|
static |
Definition at line 1016 of file cp-namespace.c.
References gdb_printf().
|
static |
Definition at line 483 of file cp-namespace.c.
References name, and general_symbol_info::natural_name().
Referenced by cp_lookup_symbol_imports_or_template().