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 <signal.h>
#include "safe-ctype.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 |
#define | LENGTH_OF_OPERATOR 8 |
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 | maint_cplus_command (char *arg, int from_tty) |
static void | first_component_command (char *arg, int from_tty) |
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 void | do_demangled_name_parse_free_cleanup (void *data) |
struct cleanup * | make_cleanup_cp_demangled_name_parse_free (struct demangle_parse_info *info) |
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) |
char * | cp_canonicalize_string_full (const char *string, canonicalization_ftype *finder, void *data) |
char * | cp_canonicalize_string_no_typedefs (const char *string) |
char * | cp_canonicalize_string (const char *string) |
static struct 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) |
char * | cp_remove_params (const char *demangled_name) |
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) |
static void | reset_directive_searched (void *data) |
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) |
static void | info_vtbl_command (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 |
initialize_file_ftype | _initialize_cp_support |
#define d_left | ( | dc | ) | (dc)->u.s_binary.left |
Definition at line 39 of file cp-support.c.
Referenced by check_cv_qualifiers(), cp_class_name_from_physname(), cp_remove_params(), replace_typedefs(), replace_typedefs_qualified_name(), and unqualified_name_from_comp().
#define d_right | ( | dc | ) | (dc)->u.s_binary.right |
Definition at line 40 of file cp-support.c.
Referenced by cp_class_name_from_physname(), replace_typedefs(), replace_typedefs_qualified_name(), and unqualified_name_from_comp().
#define LENGTH_OF_OPERATOR 8 |
Definition at line 976 of file cp-support.c.
Referenced by cp_find_first_component_aux().
void _initialize_cp_support | ( | void | ) |
Definition at line 1672 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_command(), maintenance_set_cmdlist, maintenance_show_cmdlist, and maintenancelist.
|
static |
|
static |
Definition at line 90 of file cp-support.c.
Referenced by inspect_type(), and replace_typedefs_qualified_name().
Definition at line 122 of file cp-support.c.
Referenced by cp_canonicalize_string().
char* cp_canonicalize_string | ( | const char * | string | ) |
Definition at line 587 of file cp-support.c.
References _, cp_already_canonical(), cp_comp_to_string(), cp_demangled_name_parse_free(), cp_demangled_name_to_comp(), demangle_parse_info::info, demangle_parse_info::tree, warning(), and xfree().
Referenced by check_status_exception_catchpoint(), define_symbol(), demangle_for_lookup(), dwarf2_canonicalize_name(), gnuv3_get_typeid(), lookup_minimal_symbol(), read_dbx_symtab(), and read_type().
char* cp_canonicalize_string_full | ( | const char * | string, |
canonicalization_ftype * | finder, | ||
void * | data | ||
) |
Definition at line 538 of file cp-support.c.
References cp_comp_to_string(), cp_demangled_name_parse_free(), cp_demangled_name_to_comp(), gdb_assert, demangle_parse_info::info, replace_typedefs(), demangle_parse_info::tree, and xfree().
Referenced by cp_canonicalize_string_no_typedefs(), and print_name_maybe_canonical().
char* cp_canonicalize_string_no_typedefs | ( | const char * | string | ) |
Definition at line 577 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 673 of file cp-support.c.
References cp_comp_to_string(), cp_demangled_name_parse_free(), d_left, d_right, demangle_parse_info::info, mangled_name_to_comp(), demangle_parse_info::tree, and xfree().
Definition at line 1114 of file cp-support.c.
References cp_find_first_component(), and gdb_assert.
Referenced by cp_lookup_symbol_imports_or_template(), cp_lookup_symbol_in_namespace(), cp_set_block_scope(), and make_symbol_overload_list_adl_namespace().
Definition at line 964 of file cp-support.c.
References cp_find_first_component_aux().
Referenced by cp_entire_prefix_len(), cp_lookup_transparent_type_loop(), cp_scan_for_anonymous_namespaces(), find_oload_champ_namespace_loop(), first_component_command(), and lookup_namespace_scope().
Definition at line 979 of file cp-support.c.
References demangled_name_complaint(), and LENGTH_OF_OPERATOR.
Referenced by cp_find_first_component().
char* cp_func_name | ( | const char * | full_name | ) |
Definition at line 855 of file cp-support.c.
References cp_comp_to_string(), cp_demangled_name_parse_free(), cp_demangled_name_to_comp(), demangle_parse_info::info, demangle_parse_info::tree, and unqualified_name_from_comp().
Referenced by find_overload_match().
Definition at line 1451 of file cp-support.c.
References _, check_typedef(), LOC_TYPEDEF, lookup_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().
char* cp_remove_params | ( | const char * | demangled_name | ) |
Definition at line 880 of file cp-support.c.
References cp_comp_to_string(), cp_demangled_name_parse_free(), cp_demangled_name_to_comp(), d_left, demangle_parse_info::info, and demangle_parse_info::tree.
Referenced by find_frame_funname(), find_slot_in_mapped_hash(), frame_info(), overload_list_add_symbol(), and psymtab_search_name().
|
static |
Definition at line 1101 of file cp-support.c.
References complaint(), and symfile_complaints.
Referenced by cp_find_first_component_aux().
|
static |
Definition at line 100 of file cp-support.c.
References cp_demangled_name_parse_free(), and demangle_parse_info::info.
Referenced by make_cleanup_cp_demangled_name_parse_free().
|
static |
Definition at line 1640 of file cp-support.c.
References cp_find_first_component(), len, and printf_unfiltered().
Referenced by _initialize_cp_support().
Definition at line 1529 of file cp-support.c.
References _, begin_line(), can_dump_core(), catch_demangler_crashes, demangler_warning(), do_cleanups(), fprintf_unfiltered(), gdb_demangle_attempt_core_dump, gdb_demangle_jmp_buf, gdb_demangle_signal_handler(), gdb_stderr, LIMIT_CUR, make_cleanup(), ofunc, SIGSETJMP, target_terminal_ours(), warn_cant_dump_core(), xfree(), and xstrprintf().
Referenced by c_type_print_base(), check_stub_method(), d_demangle(), demangle_for_lookup(), dwarf2_name(), dwarf2_physname(), fixup_partial_die(), gnuv2_value_rtti_type(), gnuv3_print_method_ptr(), java_demangle(), java_type_print_base(), mangled_name_to_comp(), symbol_find_demangled_name(), and unk_lang_demangle().
|
static |
Definition at line 1511 of file cp-support.c.
References dump_core(), gdb_demangle_attempt_core_dump, gdb_demangle_jmp_buf, and SIGLONGJMP.
Referenced by gdb_demangle().
|
static |
Definition at line 1663 of file cp-support.c.
References cplus_print_vtable(), and parse_and_eval().
Referenced by _initialize_cp_support().
|
static |
Definition at line 152 of file cp-support.c.
References 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, len, lookup_symbol(), mem_fileopen(), name, demangle_parse_info::obstack, replace_typedefs(), RETURN_MASK_ALL, RETURN_MASK_ERROR, 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, ui_file_delete(), ui_file_obsavestring(), VAR_DOMAIN, and xfree().
Referenced by replace_typedefs(), and replace_typedefs_qualified_name().
|
static |
Definition at line 1626 of file cp-support.c.
References _, all_commands, gdb_stdout, help_list(), and printf_unfiltered().
Referenced by _initialize_cp_support().
struct cleanup* make_cleanup_cp_demangled_name_parse_free | ( | struct demangle_parse_info * | info | ) |
Definition at line 110 of file cp-support.c.
References do_demangled_name_parse_free_cleanup(), and make_cleanup().
Referenced by typy_legacy_template_argument().
Definition at line 1186 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 xmalloc().
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 1322 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 1273 of file cp-support.c.
References BASETYPE_VIA_PUBLIC, check_typedef(), cp_entire_prefix_len(), make_symbol_overload_list_namespace(), block::the_namespace, TYPE_BASECLASS, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_PTR, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_CODE_TYPEDEF, TYPE_N_BASECLASSES, TYPE_NAME, and TYPE_TARGET_TYPE.
Referenced by make_symbol_overload_list_adl().
|
static |
Definition at line 1225 of file cp-support.c.
References ALL_BLOCK_SYMBOLS_WITH_NAME, and overload_list_add_symbol().
Referenced by make_symbol_overload_list_namespace(), and make_symbol_overload_list_qualified().
|
static |
Definition at line 1238 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 1404 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(), sym_fns::qf, QUIT, objfile::sf, and STATIC_BLOCK.
Referenced by make_symbol_overload_list().
|
static |
Definition at line 1352 of file cp-support.c.
References using_direct::alias, BLOCK_SUPERBLOCK, block_using(), using_direct::declaration, discard_cleanups(), get_selected_block(), using_direct::import_dest, using_direct::import_src, make_cleanup(), make_symbol_overload_list_namespace(), using_direct::next, reset_directive_searched(), and using_direct::searched.
Referenced by make_symbol_overload_list().
|
static |
Definition at line 627 of file cp-support.c.
References cp_demangled_name_to_comp(), cp_new_demangle_parse_info(), gdb_demangle(), demangle_parse_info::info, demangle_parse_info::tree, 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 822 of file cp-support.c.
References cp_comp_to_string(), cp_demangled_name_parse_free(), demangle_parse_info::info, mangled_name_to_comp(), demangle_parse_info::tree, unqualified_name_from_comp(), and xfree().
Referenced by stabs_method_name_from_physname().
Definition at line 1138 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, xfree(), and xrealloc().
Referenced by make_symbol_overload_list_block().
|
static |
Definition at line 438 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, VAR_DOMAIN, and xfree().
Referenced by cp_canonicalize_string_full(), inspect_type(), and replace_typedefs_qualified_name().
|
static |
Definition at line 316 of file cp-support.c.
References copy_string_to_obstack(), cp_comp_to_string(), d_left, d_right, fputs_unfiltered(), inspect_type(), len, mem_fileopen(), name, demangle_parse_info::obstack, replace_typedefs(), ui_file_delete(), ui_file_obsavestring(), ui_file_rewind(), ui_file_write(), and xfree().
Referenced by replace_typedefs().
|
static |
Definition at line 1340 of file cp-support.c.
References using_direct::searched.
Referenced by make_symbol_overload_list_using().
|
static |
Definition at line 767 of file cp-support.c.
References d_left, d_right, and gdb_assert.
Referenced by cp_func_name(), and method_name_from_physname().
initialize_file_ftype _initialize_cp_support |
|
static |
Definition at line 1498 of file cp-support.c.
Referenced by _initialize_cp_support(), and gdb_demangle().
|
static |
Definition at line 1506 of file cp-support.c.
Referenced by gdb_demangle(), and gdb_demangle_signal_handler().
|
static |
Definition at line 1502 of file cp-support.c.
Referenced by gdb_demangle(), and gdb_demangle_signal_handler().
Definition at line 73 of file cp-support.c.
Referenced by inspect_type().
struct cmd_list_element* maint_cplus_cmd_list = NULL |
Definition at line 65 of file cp-support.c.
Referenced by _initialize_cp_namespace().
|
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().
|
static |
Definition at line 52 of file cp-support.c.
Referenced by make_symbol_overload_list(), and overload_list_add_symbol().
|
static |
Definition at line 51 of file cp-support.c.
Referenced by make_symbol_overload_list(), make_symbol_overload_list_adl(), and overload_list_add_symbol().