GDB (xrefs)
|
#include "symtab.h"
#include "gdbsupport/gdb_vecs.h"
#include "gdbsupport/gdb_obstack.h"
#include "gdbsupport/array-view.h"
#include <vector>
Go to the source code of this file.
Classes | |
struct | demangle_parse_info |
Macros | |
#define | CP_ANONYMOUS_NAMESPACE_STR "(anonymous namespace)" |
#define | CP_ANONYMOUS_NAMESPACE_LEN 21 |
#define | CP_OPERATOR_STR "operator" |
#define | CP_OPERATOR_LEN 8 |
Typedefs | |
typedef const char *() | canonicalization_ftype(struct type *, void *) |
Functions | |
gdb::unique_xmalloc_ptr< char > | cp_canonicalize_string (const char *string) |
gdb::unique_xmalloc_ptr< char > | cp_canonicalize_string_no_typedefs (const char *string) |
gdb::unique_xmalloc_ptr< char > | cp_canonicalize_string_full (const char *string, canonicalization_ftype *finder, void *data) |
char * | cp_class_name_from_physname (const char *physname) |
char * | method_name_from_physname (const char *physname) |
unsigned int | cp_find_first_component (const char *name) |
unsigned int | cp_entire_prefix_len (const char *name) |
gdb::unique_xmalloc_ptr< char > | cp_func_name (const char *full_name) |
gdb::unique_xmalloc_ptr< char > | cp_remove_params (const char *demanged_name) |
gdb::unique_xmalloc_ptr< char > | cp_remove_params_if_any (const char *demangled_name, bool completion_mode) |
std::vector< symbol * > | make_symbol_overload_list (const char *, const char *) |
void | add_symbol_overload_list_adl (gdb::array_view< type * > arg_types, const char *func_name, std::vector< symbol * > *overload_list) |
struct type * | cp_lookup_rtti_type (const char *name, const struct block *block) |
unsigned int | cp_search_name_hash (const char *search_name) |
symbol_name_matcher_ftype * | cp_get_symbol_name_matcher (const lookup_name_info &lookup_name) |
int | cp_is_in_anonymous (const char *symbol_name) |
void | cp_scan_for_anonymous_namespaces (struct buildsym_compunit *, const struct symbol *symbol, struct objfile *objfile) |
struct block_symbol | cp_lookup_symbol_nonlocal (const struct language_defn *langdef, const char *name, const struct block *block, const domain_enum domain) |
struct block_symbol | cp_lookup_symbol_namespace (const char *the_namespace, const char *name, const struct block *block, const domain_enum domain) |
struct block_symbol | cp_lookup_symbol_imports_or_template (const char *scope, const char *name, const struct block *block, const domain_enum domain) |
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) |
struct type * | cp_find_type_baseclass_by_name (struct type *parent_type, const char *name) |
std::unique_ptr< demangle_parse_info > | cp_demangled_name_to_comp (const char *demangled_name, std::string *errmsg) |
gdb::unique_xmalloc_ptr< char > | cp_comp_to_string (struct demangle_component *result, int estimated_len) |
void | cp_merge_demangle_parse_infos (struct demangle_parse_info *, struct demangle_component *, struct demangle_parse_info *) |
gdb::unique_xmalloc_ptr< char > | gdb_demangle (const char *name, int options) |
char * | gdb_cplus_demangle_print (int options, struct demangle_component *tree, int estimated_length, size_t *p_allocated_size) |
const char * | find_toplevel_char (const char *s, char c) |
Variables | |
struct cmd_list_element * | maint_cplus_cmd_list |
#define CP_ANONYMOUS_NAMESPACE_LEN 21 |
Definition at line 49 of file cp-support.h.
#define CP_ANONYMOUS_NAMESPACE_STR "(anonymous namespace)" |
Definition at line 45 of file cp-support.h.
#define CP_OPERATOR_LEN 8 |
Definition at line 57 of file cp-support.h.
#define CP_OPERATOR_STR "operator" |
Definition at line 53 of file cp-support.h.
typedef const char *() canonicalization_ftype(struct type *, void *) |
Definition at line 86 of file cp-support.h.
void add_symbol_overload_list_adl | ( | gdb::array_view< type * > | arg_types, |
const char * | func_name, | ||
std::vector< symbol * > * | overload_list | ||
) |
Definition at line 1374 of file cp-support.c.
References add_symbol_overload_list_adl_namespace().
Referenced by find_oload_champ_namespace_loop().
gdb::unique_xmalloc_ptr< char > cp_canonicalize_string | ( | const char * | string | ) |
Definition at line 626 of file cp-support.c.
References cp_already_canonical(), cp_comp_to_string(), and cp_demangled_name_to_comp().
Referenced by c_canonicalize_name(), exception_catchpoint::check_status(), define_symbol(), demangle_for_lookup(), cooked_index::do_finalize(), dwarf2_canonicalize_name(), gnuv3_get_typeid(), read_dbx_symtab(), read_type(), and yyparse().
gdb::unique_xmalloc_ptr< char > cp_canonicalize_string_full | ( | const char * | string, |
canonicalization_ftype * | finder, | ||
void * | data | ||
) |
Definition at line 582 of file cp-support.c.
References cp_comp_to_string(), cp_demangled_name_to_comp(), and replace_typedefs().
Referenced by cp_canonicalize_string_no_typedefs(), and print_name_maybe_canonical().
gdb::unique_xmalloc_ptr< char > cp_canonicalize_string_no_typedefs | ( | const char * | string | ) |
Definition at line 616 of file cp-support.c.
References cp_canonicalize_string_full().
Referenced by completion_list_add_symbol(), find_linespec_symbols(), and inspect_type().
char * cp_class_name_from_physname | ( | const char * | physname | ) |
Definition at line 705 of file cp-support.c.
References cp_comp_to_string(), d_left, d_right, mangled_name_to_comp(), and xfree().
Referenced by cplus_language::class_name_from_physname().
gdb::unique_xmalloc_ptr< char > cp_comp_to_string | ( | struct demangle_component * | result, |
int | estimated_len | ||
) |
Definition at line 4140 of file cp-name-parser.c.
References err, and gdb_cplus_demangle_print().
Referenced by cp_canonicalize_string(), cp_canonicalize_string_full(), cp_class_name_from_physname(), cp_func_name(), cp_remove_params_1(), method_name_from_physname(), replace_typedefs(), replace_typedefs_qualified_name(), replace_typedefs_template(), and typy_lookup_type().
std::unique_ptr< demangle_parse_info > cp_demangled_name_to_comp | ( | const char * | demangled_name, |
std::string * | errmsg | ||
) |
Definition at line 4211 of file cp-name-parser.c.
References allocate_info(), cpname_state::demangle_info, errmsg, cpname_state::error_lexptr, cpname_state::global_errmsg, cpname_state::global_result, cpname_state::lexptr, cpname_state::prev_lexptr, and yyparse.
Referenced by cp_canonicalize_string(), cp_canonicalize_string_full(), cp_func_name(), cp_remove_params_1(), inspect_type(), mangled_name_to_comp(), and typy_legacy_template_argument().
unsigned int cp_entire_prefix_len | ( | const char * | name | ) |
Definition at line 1187 of file cp-support.c.
References cp_find_first_component(), and name.
Referenced by add_symbol_overload_list_adl_namespace(), cp_lookup_symbol_imports_or_template(), cp_lookup_symbol_in_namespace(), cp_search_name_hash(), and cp_set_block_scope().
unsigned int cp_find_first_component | ( | const char * | name | ) |
Definition at line 1036 of file cp-support.c.
References cp_find_first_component_aux(), and name.
Referenced by mapped_index_base::build_name_components(), cp_entire_prefix_len(), cp_lookup_transparent_type_loop(), cp_scan_for_anonymous_namespaces(), cp_symbol_name_matches_1(), find_oload_champ_namespace_loop(), first_component_command(), lookup_namespace_scope(), rust_language::lookup_symbol_nonlocal(), rust_crate_for_block(), split_name(), rust_parser::super_name(), and type_name_to_scope().
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().
gdb::unique_xmalloc_ptr< char > cp_func_name | ( | const char * | full_name | ) |
Definition at line 882 of file cp-support.c.
References cp_comp_to_string(), cp_demangled_name_to_comp(), and unqualified_name_from_comp().
Referenced by compile_cplus_instance::decl_name(), and find_overload_match().
symbol_name_matcher_ftype * cp_get_symbol_name_matcher | ( | const lookup_name_info & | lookup_name | ) |
Definition at line 1870 of file cp-support.c.
References cp_fq_symbol_name_matches(), cp_symbol_name_matches(), EXPRESSION, FULL, lookup_name_info::match_type(), SEARCH_NAME, and WILD.
Referenced by cplus_language::get_symbol_name_matcher_inner(), and f_language::get_symbol_name_matcher_inner().
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().
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().
Definition at line 1492 of file cp-support.c.
References symbol::aclass(), check_typedef(), type::code(), LOC_TYPEDEF, lookup_symbol(), name, block_symbol::symbol, symbol::type(), and VAR_DOMAIN.
Referenced by gnuv2_value_rtti_type(), and gnuv3_rtti_type().
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().
struct block_symbol cp_lookup_symbol_namespace | ( | const char * | the_namespace, |
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().
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().
void cp_merge_demangle_parse_infos | ( | struct demangle_parse_info * | dest, |
struct demangle_component * | target, | ||
struct demangle_parse_info * | src | ||
) |
Definition at line 4186 of file cp-name-parser.c.
References demangle_parse_info::info, demangle_info::next, and demangle_parse_info::tree.
Referenced by inspect_type().
gdb::unique_xmalloc_ptr< char > cp_remove_params | ( | const char * | demanged_name | ) |
Definition at line 958 of file cp-support.c.
References cp_remove_params_1().
Referenced by find_frame_funname(), dw2_debug_names_iterator::find_vec_in_debug_names(), info_frame_command_core(), and overload_list_add_symbol().
gdb::unique_xmalloc_ptr< char > cp_remove_params_if_any | ( | const char * | demangled_name, |
bool | completion_mode | ||
) |
Definition at line 966 of file cp-support.c.
References cp_remove_params_1().
Referenced by demangle_for_lookup_info::demangle_for_lookup_info().
void cp_scan_for_anonymous_namespaces | ( | struct buildsym_compunit * | compunit, |
const struct symbol * | symbol, | ||
struct objfile * | 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().
unsigned int cp_search_name_hash | ( | const char * | search_name | ) |
Definition at line 1695 of file cp-support.c.
References cp_entire_prefix_len(), and SYMBOL_HASH_NEXT.
Referenced by cplus_language::search_name_hash(), and f_language::search_name_hash().
const char * find_toplevel_char | ( | const char * | s, |
char | c | ||
) |
Definition at line 2236 of file cp-support.c.
References CP_OPERATOR_LEN, CP_OPERATOR_STR, and scan().
Referenced by explicit_location_spec_lex_one_function(), find_toplevel_string(), skip_op_false_positives(), skip_quote_char(), and skip_template_parameter_list().
char * gdb_cplus_demangle_print | ( | int | options, |
struct demangle_component * | tree, | ||
int | estimated_length, | ||
size_t * | p_allocated_size | ||
) |
Definition at line 1673 of file cp-support.c.
Referenced by cp_comp_to_string().
gdb::unique_xmalloc_ptr< char > gdb_demangle | ( | const char * | name, |
int | options | ||
) |
Definition at line 1606 of file cp-support.c.
References catch_demangler_crashes, gdb_demangle_attempt_core_dump, gdb_demangle_jmp_buf, gdb_demangle_signal_handler(), name, report_failed_demangle(), and run_on_main_thread().
Referenced by c_type_print_base_struct_union(), check_stub_method(), d_demangle(), demangle_for_lookup(), cplus_language::demangle_symbol(), auto_or_unknown_language::demangle_symbol(), rust_language::demangle_symbol(), dwarf2_name(), dwarf2_physname(), gnuv2_value_rtti_type(), gnuv3_print_method_ptr(), mangled_name_to_comp(), cplus_language::sniff_from_mangled_name(), and rust_language::sniff_from_mangled_name().
std::vector< symbol * > make_symbol_overload_list | ( | const char * | func_name, |
const char * | the_namespace | ||
) |
Definition at line 1242 of file cp-support.c.
References add_symbol_overload_list_qualified(), add_symbol_overload_list_using(), and name.
Referenced by find_oload_champ_namespace_loop().
char * method_name_from_physname | ( | const char * | physname | ) |
Definition at line 852 of file cp-support.c.
References cp_comp_to_string(), mangled_name_to_comp(), unqualified_name_from_comp(), and xfree().
Referenced by stabs_method_name_from_physname().
|
extern |
Definition at line 72 of file cp-support.c.