GDB (xrefs)
Loading...
Searching...
No Matches
Macros | Functions | Variables
cp-abi.c File Reference
#include "defs.h"
#include "language.h"
#include "value.h"
#include "cp-abi.h"
#include "command.h"
#include "gdbcmd.h"
#include "ui-out.h"

Go to the source code of this file.

Macros

#define CP_ABI_MAX   8
 

Functions

static struct cp_abi_opsfind_cp_abi (const char *short_name)
 
enum ctor_kinds is_constructor_name (const char *name)
 
enum dtor_kinds is_destructor_name (const char *name)
 
int is_vtable_name (const char *name)
 
int is_operator_name (const char *name)
 
int baseclass_offset (struct type *type, int index, const gdb_byte *valaddr, LONGEST embedded_offset, CORE_ADDR address, const struct value *val)
 
struct valuevalue_virtual_fn_field (struct value **arg1p, struct fn_field *f, int j, struct type *type, int offset)
 
struct typevalue_rtti_type (struct value *v, int *full, LONGEST *top, int *using_enc)
 
void cplus_print_method_ptr (const gdb_byte *contents, struct type *type, struct ui_file *stream)
 
int cplus_method_ptr_size (struct type *to_type)
 
void cplus_make_method_ptr (struct type *type, gdb_byte *contents, CORE_ADDR value, int is_virtual)
 
CORE_ADDR cplus_skip_trampoline (frame_info_ptr frame, CORE_ADDR stop_pc)
 
struct valuecplus_method_ptr_to_value (struct value **this_p, struct value *method_ptr)
 
void cplus_print_vtable (struct value *value)
 
struct valuecplus_typeid (struct value *value)
 
struct typecplus_typeid_type (struct gdbarch *gdbarch)
 
struct typecplus_type_from_type_info (struct value *value)
 
std::string cplus_typename_from_type_info (struct value *value)
 
struct language_pass_by_ref_info cp_pass_by_reference (struct type *type)
 
static int switch_to_cp_abi (const char *short_name)
 
int register_cp_abi (struct cp_abi_ops *abi)
 
void set_cp_abi_as_auto_default (const char *short_name)
 
static void list_cp_abis (int from_tty)
 
static void set_cp_abi_cmd (const char *args, int from_tty)
 
static void cp_abi_completer (struct cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
 
static void show_cp_abi_cmd (const char *args, int from_tty)
 
void _initialize_cp_abi ()
 

Variables

static struct cp_abi_ops current_cp_abi = { "", NULL }
 
static struct cp_abi_ops auto_cp_abi = { "auto", NULL }
 
static struct cp_abi_opscp_abis [CP_ABI_MAX]
 
static int num_cp_abis = 0
 

Macro Definition Documentation

◆ CP_ABI_MAX

#define CP_ABI_MAX   8

Definition at line 32 of file cp-abi.c.

Referenced by register_cp_abi().

Function Documentation

◆ _initialize_cp_abi()

void _initialize_cp_abi ( )

Definition at line 390 of file cp-abi.c.

Referenced by initialize_all_files().

◆ baseclass_offset()

int baseclass_offset ( struct type * type,
int index,
const gdb_byte * valaddr,
LONGEST embedded_offset,
CORE_ADDR address,
const struct value * val )

◆ cp_abi_completer()

static void cp_abi_completer ( struct cmd_list_element * ignore,
completion_tracker & tracker,
const char * text,
const char * word )
static

Definition at line 354 of file cp-abi.c.

References complete_on_enum(), cp_abis, num_cp_abis, and ui_out::text().

◆ cp_pass_by_reference()

struct language_pass_by_ref_info cp_pass_by_reference ( struct type * type)

Definition at line 227 of file cp-abi.c.

References current_cp_abi, cp_abi_ops::pass_by_reference, and type.

Referenced by cplus_language::pass_by_reference_info().

◆ cplus_make_method_ptr()

void cplus_make_method_ptr ( struct type * type,
gdb_byte * contents,
CORE_ADDR value,
int is_virtual )

Definition at line 147 of file cp-abi.c.

References current_cp_abi, and cp_abi_ops::make_method_ptr.

Referenced by value_cast(), and value_struct_elt_for_reference().

◆ cplus_method_ptr_size()

int cplus_method_ptr_size ( struct type * to_type)

Definition at line 139 of file cp-abi.c.

References current_cp_abi, and cp_abi_ops::method_ptr_size.

Referenced by smash_to_methodptr_type().

◆ cplus_method_ptr_to_value()

struct value * cplus_method_ptr_to_value ( struct value ** this_p,
struct value * method_ptr )

◆ cplus_print_method_ptr()

void cplus_print_method_ptr ( const gdb_byte * contents,
struct type * type,
struct ui_file * stream )

Definition at line 129 of file cp-abi.c.

References current_cp_abi, and cp_abi_ops::print_method_ptr.

Referenced by generic_value_print().

◆ cplus_print_vtable()

void cplus_print_vtable ( struct value * value)

Definition at line 176 of file cp-abi.c.

References current_cp_abi, and cp_abi_ops::print_vtable.

Referenced by info_vtbl_command().

◆ cplus_skip_trampoline()

CORE_ADDR cplus_skip_trampoline ( frame_info_ptr frame,
CORE_ADDR stop_pc )

Definition at line 156 of file cp-abi.c.

References current_cp_abi, and cp_abi_ops::skip_trampoline.

Referenced by cplus_language::skip_trampoline().

◆ cplus_type_from_type_info()

struct type * cplus_type_from_type_info ( struct value * value)

Definition at line 206 of file cp-abi.c.

References current_cp_abi, cp_abi_ops::get_type_from_type_info, and value.

Referenced by compute_exception().

◆ cplus_typeid()

struct value * cplus_typeid ( struct value * value)

Definition at line 186 of file cp-abi.c.

References current_cp_abi, cp_abi_ops::get_typeid, and value.

◆ cplus_typeid_type()

struct type * cplus_typeid_type ( struct gdbarch * gdbarch)

Definition at line 196 of file cp-abi.c.

References current_cp_abi, and cp_abi_ops::get_typeid_type.

◆ cplus_typename_from_type_info()

std::string cplus_typename_from_type_info ( struct value * value)

◆ find_cp_abi()

static struct cp_abi_ops * find_cp_abi ( const char * short_name)
static

Definition at line 295 of file cp-abi.c.

References cp_abis, num_cp_abis, and cp_abi_ops::shortname.

Referenced by set_cp_abi_as_auto_default(), and switch_to_cp_abi().

◆ is_constructor_name()

enum ctor_kinds is_constructor_name ( const char * name)

◆ is_destructor_name()

enum dtor_kinds is_destructor_name ( const char * name)

◆ is_operator_name()

int is_operator_name ( const char * name)

Definition at line 61 of file cp-abi.c.

References current_cp_abi, cp_abi_ops::is_operator_name, and name.

Referenced by gdb_mangle_name(), and linespec_lexer_lex_string().

◆ is_vtable_name()

int is_vtable_name ( const char * name)

◆ list_cp_abis()

static void list_cp_abis ( int from_tty)
static

Definition at line 309 of file cp-abi.c.

References cp_abis, current_uiout, ui_out::field_string(), num_cp_abis, and ui_out::text().

Referenced by set_cp_abi_cmd().

◆ register_cp_abi()

int register_cp_abi ( struct cp_abi_ops * abi)

Definition at line 252 of file cp-abi.c.

References CP_ABI_MAX, cp_abis, and num_cp_abis.

◆ set_cp_abi_as_auto_default()

void set_cp_abi_as_auto_default ( const char * short_name)

◆ set_cp_abi_cmd()

static void set_cp_abi_cmd ( const char * args,
int from_tty )
static

Definition at line 339 of file cp-abi.c.

References list_cp_abis(), and switch_to_cp_abi().

◆ show_cp_abi_cmd()

static void show_cp_abi_cmd ( const char * args,
int from_tty )
static

◆ switch_to_cp_abi()

static int switch_to_cp_abi ( const char * short_name)
static

Definition at line 237 of file cp-abi.c.

References current_cp_abi, and find_cp_abi().

Referenced by set_cp_abi_as_auto_default(), and set_cp_abi_cmd().

◆ value_rtti_type()

struct type * value_rtti_type ( struct value * v,
int * full,
LONGEST * top,
int * using_enc )

◆ value_virtual_fn_field()

struct value * value_virtual_fn_field ( struct value ** arg1p,
struct fn_field * f,
int j,
struct type * type,
int offset )

Definition at line 97 of file cp-abi.c.

References current_cp_abi, f(), value::offset(), type, and cp_abi_ops::virtual_fn_field.

Referenced by find_overload_match(), and search_struct_method().

Variable Documentation

◆ auto_cp_abi

struct cp_abi_ops auto_cp_abi = { "auto", NULL }
static

Definition at line 30 of file cp-abi.c.

Referenced by set_cp_abi_as_auto_default().

◆ cp_abis

struct cp_abi_ops* cp_abis[CP_ABI_MAX]
static

Definition at line 33 of file cp-abi.c.

Referenced by cp_abi_completer(), find_cp_abi(), list_cp_abis(), and register_cp_abi().

◆ current_cp_abi

struct cp_abi_ops current_cp_abi = { "", NULL }
static

◆ num_cp_abis

int num_cp_abis = 0
static

Definition at line 34 of file cp-abi.c.

Referenced by cp_abi_completer(), find_cp_abi(), list_cp_abis(), and register_cp_abi().