|
GDB (xrefs)
|
#include "defs.h"#include "cp-support.h"#include "demangle.h"#include "gdbcmd.h"#include "dictionary.h"#include "objfiles.h"#include "frame.h"#include "symtab.h"#include "block.h"#include "complaints.h"#include "gdbtypes.h"#include "expression.h"#include "value.h"#include "cp-abi.h"#include "namespace.h"#include <signal.h>#include "gdb_setjmp.h"#include "safe-ctype.h"#include "selftest.h"Go to the source code of this file.
Macros | |
| #define | d_left(dc) (dc)->u.s_binary.left |
| #define | d_right(dc) (dc)->u.s_binary.right |
Functions | |
| static unsigned int | cp_find_first_component_aux (const char *name, int permissive) |
| static void | demangled_name_complaint (const char *name) |
| static void | overload_list_add_symbol (struct symbol *sym, const char *oload_name) |
| static void | make_symbol_overload_list_using (const char *func_name, const char *the_namespace) |
| static void | make_symbol_overload_list_qualified (const char *func_name) |
| static void | replace_typedefs (struct demangle_parse_info *info, struct demangle_component *ret_comp, canonicalization_ftype *finder, void *data) |
| static char * | copy_string_to_obstack (struct obstack *obstack, const char *string, long *len) |
| static int | cp_already_canonical (const char *string) |
| static int | inspect_type (struct demangle_parse_info *info, struct demangle_component *ret_comp, canonicalization_ftype *finder, void *data) |
| static void | replace_typedefs_qualified_name (struct demangle_parse_info *info, struct demangle_component *ret_comp, canonicalization_ftype *finder, void *data) |
| static void | check_cv_qualifiers (struct demangle_component *ret_comp) |
| std::string | cp_canonicalize_string_full (const char *string, canonicalization_ftype *finder, void *data) |
| std::string | cp_canonicalize_string_no_typedefs (const char *string) |
| std::string | cp_canonicalize_string (const char *string) |
| static std::unique_ptr< demangle_parse_info > | mangled_name_to_comp (const char *mangled_name, int options, void **memory, char **demangled_p) |
| char * | cp_class_name_from_physname (const char *physname) |
| static struct demangle_component * | unqualified_name_from_comp (struct demangle_component *comp) |
| char * | method_name_from_physname (const char *physname) |
| char * | cp_func_name (const char *full_name) |
| static gdb::unique_xmalloc_ptr< char > | cp_remove_params_1 (const char *demangled_name, bool require_params) |
| gdb::unique_xmalloc_ptr< char > | cp_remove_params (const char *demangled_name) |
| gdb::unique_xmalloc_ptr< char > | cp_remove_params_if_any (const char *demangled_name, bool completion_mode) |
| unsigned int | cp_find_first_component (const char *name) |
| unsigned int | cp_entire_prefix_len (const char *name) |
| struct symbol ** | make_symbol_overload_list (const char *func_name, const char *the_namespace) |
| static void | make_symbol_overload_list_block (const char *name, const struct block *block) |
| static void | make_symbol_overload_list_namespace (const char *func_name, const char *the_namespace) |
| static void | make_symbol_overload_list_adl_namespace (struct type *type, const char *func_name) |
| struct symbol ** | make_symbol_overload_list_adl (struct type **arg_types, int nargs, const char *func_name) |
| struct type * | cp_lookup_rtti_type (const char *name, struct block *block) |
| static void | gdb_demangle_signal_handler (int signo) |
| char * | gdb_demangle (const char *name, int options) |
| int | gdb_sniff_from_mangled_name (const char *mangled, char **demangled) |
| unsigned int | cp_search_name_hash (const char *search_name) |
| static bool | cp_symbol_name_matches_1 (const char *symbol_search_name, const char *lookup_name, size_t lookup_name_len, strncmp_iw_mode mode, completion_match_result *comp_match_res) |
| static bool | cp_fq_symbol_name_matches (const char *symbol_search_name, const lookup_name_info &lookup_name, completion_match_result *comp_match_res) |
| static bool | cp_symbol_name_matches (const char *symbol_search_name, const lookup_name_info &lookup_name, completion_match_result *comp_match_res) |
| symbol_name_matcher_ftype * | cp_get_symbol_name_matcher (const lookup_name_info &lookup_name) |
| static void | maint_cplus_command (const char *arg, int from_tty) |
| static void | first_component_command (const char *arg, int from_tty) |
| static void | info_vtbl_command (const char *arg, int from_tty) |
| void | _initialize_cp_support (void) |
Variables | |
| static int | sym_return_val_size = -1 |
| static int | sym_return_val_index |
| static struct symbol ** | sym_return_val |
| struct cmd_list_element * | maint_cplus_cmd_list = NULL |
| static const char *const | ignore_typedefs [] |
| static int | catch_demangler_crashes = 1 |
| static SIGJMP_BUF | gdb_demangle_jmp_buf |
| static int | gdb_demangle_attempt_core_dump = 1 |
| #define d_left | ( | dc | ) | (dc)->u.s_binary.left |
Definition at line 41 of file cp-support.c.
Referenced by check_cv_qualifiers(), cp_class_name_from_physname(), cp_remove_params_1(), replace_typedefs(), replace_typedefs_qualified_name(), and unqualified_name_from_comp().
| #define d_right | ( | dc | ) | (dc)->u.s_binary.right |
Definition at line 42 of file cp-support.c.
Referenced by cp_class_name_from_physname(), replace_typedefs(), replace_typedefs_qualified_name(), and unqualified_name_from_comp().
| void _initialize_cp_support | ( | void | ) |
Definition at line 2166 of file cp-support.c.
References _, add_alias_cmd(), add_cmd(), add_info(), add_prefix_cmd(), add_setshow_boolean_cmd(), catch_demangler_crashes, class_maintenance, first_component_command(), info_vtbl_command(), maint_cplus_cmd_list, maint_cplus_command(), maintenance_set_cmdlist, maintenance_show_cmdlist, maintenancelist, and selftests::register_test().
|
static |
|
static |
Definition at line 87 of file cp-support.c.
Referenced by inspect_type(), and replace_typedefs_qualified_name().
|
static |
Definition at line 101 of file cp-support.c.
Referenced by cp_canonicalize_string().
| std::string cp_canonicalize_string | ( | const char * | string | ) |
Definition at line 552 of file cp-support.c.
References _, cp_already_canonical(), cp_comp_to_string(), cp_demangled_name_to_comp(), string, and warning().
Referenced by check_status_exception_catchpoint(), define_symbol(), demangle_for_lookup(), dwarf2_canonicalize_name(), gnuv3_get_typeid(), read_dbx_symtab(), read_type(), and yyparse().
| std::string cp_canonicalize_string_full | ( | const char * | string, |
| canonicalization_ftype * | finder, | ||
| void * | data | ||
| ) |
Definition at line 508 of file cp-support.c.
References cp_comp_to_string(), cp_demangled_name_to_comp(), gdb_assert, replace_typedefs(), and string.
Referenced by cp_canonicalize_string_no_typedefs(), and print_name_maybe_canonical().
| std::string cp_canonicalize_string_no_typedefs | ( | const char * | string | ) |
Definition at line 542 of file cp-support.c.
References cp_canonicalize_string_full().
Referenced by find_linespec_symbols(), and inspect_type().
| char* cp_class_name_from_physname | ( | const char * | physname | ) |
Definition at line 636 of file cp-support.c.
References cp_comp_to_string(), d_left, d_right, mangled_name_to_comp(), and xfree().
| unsigned int cp_entire_prefix_len | ( | const char * | name | ) |
Definition at line 1122 of file cp-support.c.
References cp_find_first_component(), gdb_assert, and name.
Referenced by cp_lookup_symbol_imports_or_template(), cp_lookup_symbol_in_namespace(), cp_search_name_hash(), cp_set_block_scope(), and make_symbol_overload_list_adl_namespace().
| unsigned int cp_find_first_component | ( | const char * | name | ) |
Definition at line 970 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_crate_for_block(), rust_lookup_symbol_nonlocal(), and super_name().
|
static |
Definition at line 981 of file cp-support.c.
References CP_OPERATOR_LEN, CP_OPERATOR_STR, demangled_name_complaint(), name, and startswith().
Referenced by cp_find_first_component().
|
static |
Definition at line 1743 of file cp-support.c.
References lookup_name_info::completion_mode(), lookup_name_info::cplus(), language_cplus, demangle_for_lookup_info::lookup_name(), completion_match_result::match_for_lcd, MATCH_PARAMS, name, NORMAL, completion_match_result::set_match(), string, strncmp_iw_with_mode(), and symbol_search_name().
Referenced by cp_get_symbol_name_matcher().
| char* cp_func_name | ( | const char * | full_name | ) |
Definition at line 816 of file cp-support.c.
References cp_comp_to_string(), cp_demangled_name_to_comp(), and unqualified_name_from_comp().
Referenced by find_overload_match().
| symbol_name_matcher_ftype* cp_get_symbol_name_matcher | ( | const lookup_name_info & | lookup_name | ) |
Definition at line 1790 of file cp-support.c.
References cp_fq_symbol_name_matches(), cp_symbol_name_matches(), EXPRESSION, FULL, gdb_assert_not_reached, lookup_name_info::match_type(), SEARCH_NAME, and WILD.
Definition at line 1440 of file cp-support.c.
References _, check_typedef(), LOC_TYPEDEF, lookup_symbol(), name, block_symbol::symbol, SYMBOL_CLASS, SYMBOL_TYPE, TYPE_CODE, TYPE_CODE_NAMESPACE, TYPE_CODE_STRUCT, VAR_DOMAIN, and warning().
Referenced by gnuv2_value_rtti_type(), and gnuv3_rtti_type().
| gdb::unique_xmalloc_ptr<char> cp_remove_params | ( | const char * | demangled_name | ) |
Definition at line 892 of file cp-support.c.
References cp_remove_params_1().
Referenced by find_frame_funname(), find_slot_in_mapped_hash(), dw2_debug_names_iterator::find_vec_in_debug_names(), info_frame_command(), overload_list_add_symbol(), and psymtab_search_name().
|
static |
Definition at line 841 of file cp-support.c.
References cp_comp_to_string(), cp_demangled_name_to_comp(), and d_left.
Referenced by cp_remove_params(), and cp_remove_params_if_any().
| gdb::unique_xmalloc_ptr<char> cp_remove_params_if_any | ( | const char * | demangled_name, |
| bool | completion_mode | ||
| ) |
Definition at line 900 of file cp-support.c.
References cp_remove_params_1(), and string.
Referenced by demangle_for_lookup_info::demangle_for_lookup_info().
| unsigned int cp_search_name_hash | ( | const char * | search_name | ) |
Definition at line 1621 of file cp-support.c.
References cp_entire_prefix_len(), hash(), skip_spaces(), startswith(), string, and SYMBOL_HASH_NEXT.
|
static |
Definition at line 1771 of file cp-support.c.
References lookup_name_info::completion_mode(), cp_symbol_name_matches_1(), lookup_name_info::cplus(), demangle_for_lookup_info::lookup_name(), MATCH_PARAMS, name, NORMAL, string, and symbol_search_name().
Referenced by cp_get_symbol_name_matcher().
|
static |
Definition at line 1686 of file cp-support.c.
References cp_find_first_component(), gdb_assert, language_cplus, completion_match_result::match_for_lcd, completion_match_result::set_match(), strncmp_iw_with_mode(), and symbol_search_name().
Referenced by cp_symbol_name_matches().
|
static |
Definition at line 1109 of file cp-support.c.
References complaint, name, and symfile_complaints.
Referenced by cp_find_first_component_aux().
|
static |
Definition at line 2137 of file cp-support.c.
References cp_find_first_component(), and printf_unfiltered().
Referenced by _initialize_cp_support().
| char* gdb_demangle | ( | const char * | name, |
| int | options | ||
| ) |
Definition at line 1518 of file cp-support.c.
References _, begin_line(), can_dump_core(), catch_demangler_crashes, demangler_warning(), fprintf_unfiltered(), gdb_demangle_attempt_core_dump, gdb_demangle_jmp_buf, gdb_demangle_signal_handler(), gdb_stderr, LIMIT_CUR, name, ofunc, target_terminal::ours_for_output(), SIGSETJMP, string, string_printf(), and warn_cant_dump_core().
Referenced by c_type_print_base_struct_union(), check_stub_method(), d_demangle(), demangle_for_lookup(), dwarf2_name(), dwarf2_physname(), fixup_partial_die(), gdb_sniff_from_mangled_name(), gnuv2_value_rtti_type(), gnuv3_print_method_ptr(), mangled_name_to_comp(), rust_sniff_from_mangled_name(), and unk_lang_demangle().
|
static |
Definition at line 1500 of file cp-support.c.
References dump_core(), gdb_demangle_attempt_core_dump, gdb_demangle_jmp_buf, and SIGLONGJMP.
Referenced by gdb_demangle().
| int gdb_sniff_from_mangled_name | ( | const char * | mangled, |
| char ** | demangled | ||
| ) |
Definition at line 1612 of file cp-support.c.
References gdb_demangle().
|
static |
Definition at line 2157 of file cp-support.c.
References cplus_print_vtable(), and parse_and_eval().
Referenced by _initialize_cp_support().
|
static |
Definition at line 131 of file cp-support.c.
References string_file::c_str(), CATCH, check_typedef(), copy_string_to_obstack(), cp_canonicalize_string_no_typedefs(), cp_demangled_name_to_comp(), cp_merge_demangle_parse_infos(), END_CATCH, ignore_typedefs, lookup_symbol(), name, demangle_parse_info::obstack, replace_typedefs(), RETURN_MASK_ALL, RETURN_MASK_ERROR, string_file::size(), string, block_symbol::symbol, SYMBOL_TYPE, TRY, type, TYPE_CODE, TYPE_CODE_ENUM, TYPE_CODE_NAMESPACE, TYPE_CODE_STRUCT, TYPE_CODE_TYPEDEF, TYPE_CODE_UNION, TYPE_NAME, type_print(), TYPE_TAG_NAME, TYPE_TARGET_TYPE, and VAR_DOMAIN.
Referenced by replace_typedefs(), and replace_typedefs_qualified_name().
|
static |
Definition at line 2123 of file cp-support.c.
References _, all_commands, gdb_stdout, help_list(), maint_cplus_cmd_list, and printf_unfiltered().
Referenced by _initialize_cp_support().
| struct symbol** make_symbol_overload_list | ( | const char * | func_name, |
| const char * | the_namespace | ||
| ) |
Definition at line 1189 of file cp-support.c.
References discard_cleanups(), make_cleanup(), make_symbol_overload_list_qualified(), make_symbol_overload_list_using(), name, sym_return_val, sym_return_val_index, sym_return_val_size, xfree(), and XNEWVEC.
Referenced by find_oload_champ_namespace_loop().
| struct symbol** make_symbol_overload_list_adl | ( | struct type ** | arg_types, |
| int | nargs, | ||
| const char * | func_name | ||
| ) |
Definition at line 1326 of file cp-support.c.
References gdb_assert, make_symbol_overload_list_adl_namespace(), sym_return_val, and sym_return_val_size.
Referenced by find_oload_champ_namespace_loop().
|
static |
Definition at line 1277 of file cp-support.c.
References BASETYPE_VIA_PUBLIC, check_typedef(), cp_entire_prefix_len(), make_symbol_overload_list_namespace(), TYPE_BASECLASS, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_PTR, TYPE_CODE_STRUCT, TYPE_CODE_TYPEDEF, TYPE_IS_REFERENCE, TYPE_N_BASECLASSES, TYPE_NAME, and TYPE_TARGET_TYPE.
Referenced by make_symbol_overload_list_adl().
|
static |
Definition at line 1227 of file cp-support.c.
References ALL_BLOCK_SYMBOLS_WITH_NAME, FULL, name, and overload_list_add_symbol().
Referenced by make_symbol_overload_list_namespace(), and make_symbol_overload_list_qualified().
|
static |
Definition at line 1242 of file cp-support.c.
References block_global_block(), block_static_block(), get_selected_block(), make_symbol_overload_list_block(), and name.
Referenced by make_symbol_overload_list_adl_namespace(), and make_symbol_overload_list_using().
|
static |
Definition at line 1393 of file cp-support.c.
References ALL_COMPUNITS, ALL_OBJFILES, block_static_block(), BLOCK_SUPERBLOCK, BLOCKVECTOR_BLOCK, COMPUNIT_BLOCKVECTOR, quick_symbol_functions::expand_symtabs_for_function, get_selected_block(), GLOBAL_BLOCK, make_symbol_overload_list_block(), objfile::objfile(), sym_fns::qf, QUIT, objfile::sf, and STATIC_BLOCK.
Referenced by make_symbol_overload_list().
|
static |
Definition at line 1346 of file cp-support.c.
References using_direct::alias, BLOCK_SUPERBLOCK, block_using(), using_direct::declaration, get_selected_block(), using_direct::import_dest, using_direct::import_src, make_scoped_restore(), make_symbol_overload_list_namespace(), using_direct::next, and using_direct::searched.
Referenced by make_symbol_overload_list().
|
static |
Definition at line 590 of file cp-support.c.
References cp_demangled_name_to_comp(), gdb_demangle(), and xfree().
Referenced by cp_class_name_from_physname(), and method_name_from_physname().
| char* method_name_from_physname | ( | const char * | physname | ) |
Definition at line 784 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().
|
static |
Definition at line 1146 of file cp-support.c.
References cp_remove_params(), sym_return_val, sym_return_val_index, sym_return_val_size, SYMBOL_LINKAGE_NAME, SYMBOL_NATURAL_NAME, SYMBOL_TYPE, and xrealloc().
Referenced by make_symbol_overload_list_block().
|
static |
Definition at line 407 of file cp-support.c.
References CATCH, check_cv_qualifiers(), cp_comp_to_string(), d_left, d_right, END_CATCH, inspect_type(), lookup_symbol(), replace_typedefs_qualified_name(), RETURN_MASK_ALL, SYMBOL_TYPE, TRY, and VAR_DOMAIN.
Referenced by cp_canonicalize_string_full(), inspect_type(), and replace_typedefs_qualified_name().
|
static |
Definition at line 290 of file cp-support.c.
References string_file::c_str(), string_file::clear(), copy_string_to_obstack(), cp_comp_to_string(), d_left, d_right, inspect_type(), name, demangle_parse_info::obstack, ui_file::puts(), replace_typedefs(), string_file::size(), and string_file::write().
Referenced by replace_typedefs().
|
static |
Definition at line 729 of file cp-support.c.
References d_left, d_right, and gdb_assert.
Referenced by cp_func_name(), and method_name_from_physname().
|
static |
Definition at line 1487 of file cp-support.c.
Referenced by _initialize_cp_support(), and gdb_demangle().
|
static |
Definition at line 1495 of file cp-support.c.
Referenced by gdb_demangle(), and gdb_demangle_signal_handler().
|
static |
Definition at line 1491 of file cp-support.c.
Referenced by gdb_demangle(), and gdb_demangle_signal_handler().
|
static |
Definition at line 70 of file cp-support.c.
Referenced by inspect_type().
| struct cmd_list_element* maint_cplus_cmd_list = NULL |
Definition at line 67 of file cp-support.c.
Referenced by _initialize_cp_namespace(), _initialize_cp_support(), and maint_cplus_command().
|
static |
Definition at line 55 of file cp-support.c.
Referenced by make_symbol_overload_list(), make_symbol_overload_list_adl(), and overload_list_add_symbol().
|
static |
Definition at line 54 of file cp-support.c.
Referenced by make_symbol_overload_list(), and overload_list_add_symbol().
|
static |
Definition at line 53 of file cp-support.c.
Referenced by make_symbol_overload_list(), make_symbol_overload_list_adl(), and overload_list_add_symbol().
1.8.14