GDB (xrefs)
|
#include "defs.h"
#include "cp-support.h"
#include "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"
Go to the source code of this file.
Functions | |
static struct 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 (const struct symbol *const symbol, struct objfile *const objfile) |
void | cp_add_using_directive (const char *dest, const char *src, const char *alias, const char *declaration, VEC(const_char_ptr)*excludes, int copy_names, struct obstack *obstack) |
int | cp_is_in_anonymous (const char *symbol_name) |
static struct symbol * | cp_basic_lookup_symbol (const char *name, const struct block *block, const domain_enum domain, int is_in_anonymous) |
static struct 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 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 symbol * | cp_lookup_symbol_in_namespace (const char *the_namespace, const char *name, const struct block *block, const domain_enum domain, int search) |
static void | reset_directive_searched (void *data) |
static struct 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 symbol * | cp_lookup_symbol_imports_or_template (const char *scope, const char *name, const struct block *block, const domain_enum domain) |
static struct symbol * | cp_lookup_symbol_via_all_imports (const char *scope, const char *name, const struct block *block, const domain_enum domain) |
struct symbol * | cp_lookup_symbol_namespace (const char *scope, const char *name, const struct block *block, const domain_enum domain) |
static struct 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 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 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 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 (char *args, int from_tty) |
void | _initialize_cp_namespace (void) |
Variables | |
initialize_file_ftype | _initialize_cp_namespace |
void _initialize_cp_namespace | ( | void | ) |
Definition at line 1182 of file cp-namespace.c.
References _, add_cmd(), class_maintenance, deprecate_cmd(), maint_cplus_cmd_list, and maintenance_cplus_namespace().
void cp_add_using_directive | ( | const char * | dest, |
const char * | src, | ||
const char * | alias, | ||
const char * | declaration, | ||
VEC(const_char_ptr)* | excludes, | ||
int | copy_names, | ||
struct obstack * | obstack | ||
) |
Definition at line 121 of file cp-namespace.c.
References using_direct::alias, using_direct::declaration, using_direct::excludes, using_direct::import_dest, using_direct::import_src, using_direct::next, using_directives, VEC_address, VEC_iterate, and VEC_length.
Referenced by cp_scan_for_anonymous_namespaces(), read_import_statement(), and read_namespace().
|
static |
Definition at line 217 of file cp-namespace.c.
References block_global_block(), lookup_global_symbol(), lookup_symbol_in_block(), and lookup_symbol_in_static_block().
Referenced by cp_lookup_nested_symbol_1(), and cp_lookup_symbol_in_namespace().
Definition at line 881 of file cp-namespace.c.
References CHECK_TYPEDEF, check_typedef(), cp_find_type_baseclass_by_name(), streq(), type, TYPE_BASECLASS, TYPE_BASECLASS_NAME, and TYPE_N_BASECLASSES.
Referenced by classify_inner_name(), and cp_find_type_baseclass_by_name().
Definition at line 206 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 256 of file cp-namespace.c.
References block_gdbarch(), check_typedef(), cp_lookup_nested_symbol(), gdb_assert, language_cplus, language_def(), language_lookup_primitive_type_as_symbol(), lookup_global_symbol(), lookup_language_this(), lookup_symbol_in_static_block(), SYMBOL_TYPE, target_gdbarch(), type, TYPE_NAME, TYPE_TARGET_TYPE, and VAR_DOMAIN.
Referenced by cp_lookup_symbol_in_namespace(), and lookup_namespace_scope().
struct symbol* cp_lookup_nested_symbol | ( | struct type * | parent_type, |
const char * | nested_name, | ||
const struct block * | block, | ||
const domain_enum | domain | ||
) |
Definition at line 1023 of file cp-namespace.c.
References _, CHECK_TYPEDEF, cp_is_in_anonymous(), cp_lookup_nested_symbol_1(), domain_name(), fprintf_unfiltered(), gdb_stdlog, host_address_to_string(), internal_error(), size, symbol_lookup_debug, TYPE_CODE, TYPE_CODE_ENUM, TYPE_CODE_FUNC, TYPE_CODE_METHOD, TYPE_CODE_MODULE, TYPE_CODE_NAMESPACE, TYPE_CODE_STRUCT, TYPE_CODE_UNION, type_name_no_tag(), type_name_no_tag_or_error(), and xsnprintf().
Referenced by classify_inner_name(), and cp_lookup_bare_symbol().
|
static |
Definition at line 958 of file cp-namespace.c.
References CHECK_TYPEDEF, cp_basic_lookup_symbol(), find_symbol_in_baseclass(), lookup_static_symbol(), lookup_symbol_in_static_block(), and TYPE_N_BASECLASSES.
Referenced by cp_lookup_nested_symbol(), cp_search_static_and_baseclasses(), and find_symbol_in_baseclass().
struct symbol* cp_lookup_symbol_imports_or_template | ( | const char * | scope, |
const char * | name, | ||
const struct block * | block, | ||
const domain_enum | domain | ||
) |
Definition at line 608 of file cp-namespace.c.
References BLOCK_FUNCTION, BLOCK_SUPERBLOCK, cp_entire_prefix_len(), cp_lookup_symbol_via_imports(), do_cleanups(), domain_name(), fprintf_unfiltered(), gdb_stdlog, host_address_to_string(), language_cplus, language_def(), lookup_typename(), make_cleanup(), template_symbol::n_template_arguments, search_symbol_list(), symbol_arch(), SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION, SYMBOL_LANGUAGE, symbol_lookup_debug, SYMBOL_NATURAL_NAME, template_symbol::template_arguments, TYPE_N_TEMPLATE_ARGUMENTS, TYPE_TEMPLATE_ARGUMENTS, and xfree().
Referenced by lookup_local_symbol().
|
static |
Definition at line 391 of file cp-namespace.c.
References cp_basic_lookup_symbol(), cp_entire_prefix_len(), cp_is_in_anonymous(), cp_lookup_bare_symbol(), and cp_search_static_and_baseclasses().
Referenced by cp_lookup_symbol_namespace(), cp_lookup_symbol_via_imports(), and lookup_namespace_scope().
struct symbol* cp_lookup_symbol_namespace | ( | const char * | scope, |
const char * | name, | ||
const struct block * | block, | ||
const domain_enum | domain | ||
) |
Definition at line 739 of file cp-namespace.c.
References cp_lookup_symbol_in_namespace(), cp_lookup_symbol_via_all_imports(), domain_name(), fprintf_unfiltered(), gdb_stdlog, host_address_to_string(), and symbol_lookup_debug.
Referenced by evaluate_subexp_standard(), gen_maybe_namespace_elt(), and value_maybe_namespace_elt().
struct symbol* cp_lookup_symbol_nonlocal | ( | const struct language_defn * | langdef, |
const char * | name, | ||
const struct block * | block, | ||
const domain_enum | domain | ||
) |
Definition at line 843 of file cp-namespace.c.
References block_scope(), cp_lookup_symbol_via_all_imports(), domain_name(), fprintf_unfiltered(), gdb_stdlog, host_address_to_string(), lookup_namespace_scope(), and symbol_lookup_debug.
|
static |
Definition at line 715 of file cp-namespace.c.
References BLOCK_SUPERBLOCK, and cp_lookup_symbol_via_imports().
Referenced by cp_lookup_symbol_namespace(), and cp_lookup_symbol_nonlocal().
|
static |
Definition at line 470 of file cp-namespace.c.
References using_direct::alias, block_using(), cp_lookup_symbol_in_namespace(), using_direct::declaration, discard_cleanups(), using_direct::excludes, using_direct::import_dest, using_direct::import_src, len, make_cleanup(), using_direct::next, reset_directive_searched(), using_direct::searched, and startswith().
Referenced by cp_lookup_symbol_imports_or_template(), and cp_lookup_symbol_via_all_imports().
Definition at line 1118 of file cp-namespace.c.
References basic_lookup_transparent_type(), block_scope(), cp_lookup_transparent_type_loop(), and get_selected_block().
|
static |
Definition at line 1142 of file cp-namespace.c.
References basic_lookup_transparent_type(), and cp_find_first_component().
Referenced by cp_lookup_transparent_type().
void cp_scan_for_anonymous_namespaces | ( | const struct symbol *const | symbol, |
struct objfile *const | objfile | ||
) |
Definition at line 51 of file cp-namespace.c.
References cp_add_using_directive(), CP_ANONYMOUS_NAMESPACE_LEN, CP_ANONYMOUS_NAMESPACE_STR, cp_find_first_component(), cp_is_in_anonymous(), name, objfile::objfile_obstack, and SYMBOL_DEMANGLED_NAME.
Referenced by define_symbol(), and new_symbol_full().
|
static |
Definition at line 328 of file cp-namespace.c.
References cp_lookup_nested_symbol_1(), do_cleanups(), gdb_assert, lookup_global_symbol(), make_cleanup(), savestring(), SYMBOL_TYPE, VAR_DOMAIN, and xfree().
Referenced by cp_lookup_symbol_in_namespace().
|
static |
Definition at line 909 of file cp-namespace.c.
References cp_lookup_nested_symbol_1(), do_cleanups(), free_current_contents(), len, make_cleanup(), TYPE_BASECLASS, TYPE_BASECLASS_NAME, TYPE_N_BASECLASSES, xrealloc(), and xsnprintf().
Referenced by cp_lookup_nested_symbol_1().
|
static |
Definition at line 786 of file cp-namespace.c.
References cp_find_first_component(), cp_lookup_bare_symbol(), cp_lookup_symbol_in_namespace(), and gdb_assert.
Referenced by cp_lookup_symbol_nonlocal().
|
static |
Definition at line 1173 of file cp-namespace.c.
References _, and printf_unfiltered().
Referenced by _initialize_cp_namespace().
|
static |
Definition at line 435 of file cp-namespace.c.
References using_direct::searched.
Referenced by cp_lookup_symbol_via_imports().
|
static |
Definition at line 589 of file cp-namespace.c.
References SYMBOL_NATURAL_NAME.
Referenced by cp_lookup_symbol_imports_or_template().
initialize_file_ftype _initialize_cp_namespace |