GDB (xrefs)
Macros | Functions | Variables
/tmp/gdb-7.10/gdb/cp-support.c File Reference
#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 cleanupmake_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_infomangled_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 typecp_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_elementmaint_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
 

Macro Definition Documentation

#define d_left (   dc)    (dc)->u.s_binary.left
#define d_right (   dc)    (dc)->u.s_binary.right
#define LENGTH_OF_OPERATOR   8

Definition at line 976 of file cp-support.c.

Referenced by cp_find_first_component_aux().

Function Documentation

void _initialize_cp_support ( void  )
static void check_cv_qualifiers ( struct demangle_component *  ret_comp)
static

Definition at line 424 of file cp-support.c.

References d_left.

Referenced by replace_typedefs().

static char* copy_string_to_obstack ( struct obstack *  obstack,
const char *  string,
long *  len 
)
static

Definition at line 90 of file cp-support.c.

Referenced by inspect_type(), and replace_typedefs_qualified_name().

static int cp_already_canonical ( const char *  string)
static

Definition at line 122 of file cp-support.c.

Referenced by cp_canonicalize_string().

char* cp_canonicalize_string ( const char *  string)
char* cp_canonicalize_string_full ( const char *  string,
canonicalization_ftype finder,
void *  data 
)
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)
unsigned int cp_entire_prefix_len ( const char *  name)
unsigned int cp_find_first_component ( const char *  name)
static unsigned int cp_find_first_component_aux ( const char *  name,
int  permissive 
)
static

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)
struct type* cp_lookup_rtti_type ( const char *  name,
struct block block 
)
char* cp_remove_params ( const char *  demangled_name)
static void demangled_name_complaint ( const char *  name)
static

Definition at line 1101 of file cp-support.c.

References complaint(), and symfile_complaints.

Referenced by cp_find_first_component_aux().

static void do_demangled_name_parse_free_cleanup ( void *  data)
static
static void first_component_command ( char *  arg,
int  from_tty 
)
static

Definition at line 1640 of file cp-support.c.

References cp_find_first_component(), len, and printf_unfiltered().

Referenced by _initialize_cp_support().

char* gdb_demangle ( const char *  name,
int  options 
)
static void gdb_demangle_signal_handler ( int  signo)
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 void info_vtbl_command ( char *  arg,
int  from_tty 
)
static

Definition at line 1663 of file cp-support.c.

References cplus_print_vtable(), and parse_and_eval().

Referenced by _initialize_cp_support().

static int inspect_type ( struct demangle_parse_info info,
struct demangle_component *  ret_comp,
canonicalization_ftype finder,
void *  data 
)
static
static void maint_cplus_command ( char *  arg,
int  from_tty 
)
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().

struct symbol** make_symbol_overload_list ( const char *  func_name,
const char *  the_namespace 
)
struct symbol** make_symbol_overload_list_adl ( struct type **  arg_types,
int  nargs,
const char *  func_name 
)
static void make_symbol_overload_list_adl_namespace ( struct type type,
const char *  func_name 
)
static
static void make_symbol_overload_list_block ( const char *  name,
const struct block block 
)
static
static void make_symbol_overload_list_namespace ( const char *  func_name,
const char *  the_namespace 
)
static
static void make_symbol_overload_list_qualified ( const char *  func_name)
static
static void make_symbol_overload_list_using ( const char *  func_name,
const char *  the_namespace 
)
static
static struct demangle_parse_info* mangled_name_to_comp ( const char *  mangled_name,
int  options,
void **  memory,
char **  demangled_p 
)
static
char* method_name_from_physname ( const char *  physname)
static void overload_list_add_symbol ( struct symbol sym,
const char *  oload_name 
)
static
static void replace_typedefs ( struct demangle_parse_info info,
struct demangle_component *  ret_comp,
canonicalization_ftype finder,
void *  data 
)
static
static void replace_typedefs_qualified_name ( struct demangle_parse_info info,
struct demangle_component *  ret_comp,
canonicalization_ftype finder,
void *  data 
)
static
static void reset_directive_searched ( void *  data)
static

Definition at line 1340 of file cp-support.c.

References using_direct::searched.

Referenced by make_symbol_overload_list_using().

static struct demangle_component* unqualified_name_from_comp ( struct demangle_component *  comp)
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().

Variable Documentation

initialize_file_ftype _initialize_cp_support
int catch_demangler_crashes = 1
static

Definition at line 1498 of file cp-support.c.

Referenced by _initialize_cp_support(), and gdb_demangle().

int gdb_demangle_attempt_core_dump = 1
static

Definition at line 1506 of file cp-support.c.

Referenced by gdb_demangle(), and gdb_demangle_signal_handler().

SIGJMP_BUF gdb_demangle_jmp_buf
static

Definition at line 1502 of file cp-support.c.

Referenced by gdb_demangle(), and gdb_demangle_signal_handler().

const char* const ignore_typedefs[]
static
Initial value:
=
{
"std::istream", "std::iostream", "std::ostream", "std::string"
}

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().

struct symbol** sym_return_val
static
int sym_return_val_index
static

Definition at line 52 of file cp-support.c.

Referenced by make_symbol_overload_list(), and overload_list_add_symbol().

int sym_return_val_size = -1
static