GDB (xrefs)
Defines | Functions | Variables
/home/stan/gdb/src/gdb/cp-support.c File Reference
#include "defs.h"
#include "cp-support.h"
#include "gdb_string.h"
#include "demangle.h"
#include "gdb_assert.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 "exceptions.h"
#include "expression.h"
#include "value.h"
#include "cp-abi.h"
#include "safe-ctype.h"

Go to the source code of this file.

Defines

#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 *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 *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 *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)
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 []
initialize_file_ftype _initialize_cp_support

Define 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 960 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 412 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 92 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 124 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 561 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 963 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 
) [read]
char* cp_remove_params ( const char *  demangled_name)
static void demangled_name_complaint ( const char *  name) [static]

Definition at line 1085 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 1502 of file cp-support.c.

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

Referenced by _initialize_cp_support().

char* gdb_demangle ( const char *  name,
int  options 
)
static void info_vtbl_command ( char *  arg,
int  from_tty 
) [static]

Definition at line 1525 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 1488 of file cp-support.c.

References _, gdb_stdout, help_list(), and printf_unfiltered().

Referenced by _initialize_cp_support().

Definition at line 112 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 *  namespace 
) [read]
struct symbol** make_symbol_overload_list_adl ( struct type **  arg_types,
int  nargs,
const char *  func_name 
) [read]
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 *  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 *  namespace 
) [static]
static struct demangle_parse_info* mangled_name_to_comp ( const char *  mangled_name,
int  options,
void **  memory,
char **  demangled_p 
) [static, read]
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 1326 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, read]

Definition at line 751 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

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

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

Referenced by inspect_type().

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

Referenced by _initialize_cp_namespace().

struct symbol** sym_return_val [static]

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

Referenced by make_symbol_overload_list(), and overload_list_add_symbol().

int sym_return_val_size = -1 [static]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines